Reputation: 604
I'm working with HMD and now I need to start with Unity. I want to make a scene like below. I have two character animation in which the first animation only visible to the left eye, and the second animation only visible to the right eye in HMD. It was all good.
When you see with both eye, two characters will overlap, but you can see it one by one by closing your other eye (yes, this is also part of my project). Then I need to make animation to swap the character, the rough illustration is below.
I tried to create a timeline and record it according to Unity Timeline Tutorial on Youtube Here, so the first and second character will show for 3 seconds, and then I will swap the character in the same position as before for another 3 seconds. But the scene won't show like I expected. The previous character is still shown after the duration is over. Any suggestion ??
Upvotes: 0
Views: 239
Reputation: 1598
The answer must be already be clear to everyone by now going through comments sections above but here is the complete answer. OP wanted to swap the animation at the end of 3 seconds and swap them with each other. He used Timeline feature of unity.
Note: I have never used timeline before so I went through a quick setup to check how timeline animations affect the positions of the objects in timeline and animation positions are updated based on its keyframe values.
Timeline is basically uses animator so here what happened was single game object had two states of animation. The first timeline state after finishing was overriding the second timeline state and the position of gameobject was taken from first timeline animation which kept it at initial value only.
Solution to this was merging the two animation timeline states into one as the value of position will be overridden in same timeline for the object. ie after 3 second the position of 'gameobject A' will go from X to Y instead of remaining static at X as first timeline animation would be overriding to X only instead of X->Y
Upvotes: 0