- Home /
Using Timeline for cutscene
I'm trying to create cutscene using Timeline, here is the problem i'm facing now. I want to play a cutscene when player steps into a trigger, which will disable player's control and play a Timeline sequence. The problem i'm having is that Timeline will always move player to exact keyframed position when played, but in real-life scenarios, Players will not enter trigger at exact position every single time. So there will be a "jumpy" moment during the play of cutscene, which is what I'm trying to avoid right now. What would be a good solution to this? One idea I have right now is to read from Timeline's playable for the keyframed position of player on the 1st Timeline frame (if that's possible), so everytime player enters trigger, I will use code to move it to exact position then play Timeline.
what i end up doing is made an startingPoint GameObject, which will be place at same position as the starting position of player in timeline, then move player to that point when steps into a trigger. It's a little bit more manual than being able to read data from playable, but it will do for now.
Answer by seant_unity · Jan 10, 2019 at 04:14 PM
There are a few possible ways to deal with this. You can apply an ease-in on your first clip to blend in the first animation. This may be acceptable where the trigger point and timeline position is relatively small. Another way is to use Scene Offsets (in 2018.3) on the Animation Track. This will start the timeline from the current position, instead of a fixed position. Prior to 2018.3, this behaviour is automatic if the animator has a animation controller. A third option is to author the timeline from the origin, and parent the object at runtime before you play the timeline (or some variation of this) to account for the existing position.
Could I see some code for this? I'm having a similar but not as far along issue. $$anonymous$$y post for this is here: https://answers.unity.com/questions/1659741/how-do-i-insert-my-cutscene.html
Your answer
Follow this Question
Related Questions
How to check int value of PlayerPref 1 Answer
Drop down menu trigger'd cutscene 0 Answers
How can I zoom in the curve editor of the timeline vertically? - Change the displayed range... 1 Answer
How to control Tracked Image Prefab - AR Foundation 1 Answer
How to create a cutscene on a specific spot in the game environment using cinemachine and timeline? 0 Answers