- Home /
How to keep current position when timeline starts
Hello!
I have a timeline with an animation for my Player prefab, when the timeline animation is triggered my player is automaticly placed into the position in the animation
On animation trigger the player POPS over to the location when the animation starts.
Which is fine and perfect, BUT, what if I want my Player prefab Game Object to stay in the current position wherever the player had it when the animation was triggered?
Say, player is moving in XYZ position on screen, timeline animation is triggered, the player stays still and THEN the player is moved to the new position. Instead of just popping in to place.
Thank you for your help!
Answer by ATLGAN · Aug 07, 2020 at 05:33 AM
You can make your timeline object a child of another object.
Hey ATLGAN
Thank you for your quick reply, could you elaborate a bit more on your answer?
Answer by seant_unity · Aug 10, 2020 at 11:57 AM
On the animation track, set the TrackOffsets to ApplySceneOffsets to have the character animate from their current position.
Or, continue to use ApplyTrackOffset and leave a gap on the track before the first clip by turning PreExtrapolation off. The character should teleport when the timeline hits the first clip on the track instead of at the beginning of the timeline.
Your answer
Follow this Question
Related Questions
How to animate an instantiated object in the timeline/director 2 Answers
Prefab Pivot Point 1 Answer
Timeline/custom playable How to allow in-scene animation? 0 Answers
Animated Child 0 Answers