I built a simple camera transition from third-person to first-person and back again. This transition takes place over two seconds, and my keyframes in the transition timeline are on 0.00/0.00 and 2.00/1.00. The timeline itself is set to 2.00 seconds. Yet, there’s a lag when the timeline finishes. I have an event that fires off the “Finished” pin, but it always takes a second.
Has anyone run into this?
And, if so, how do you fix it?
If anyone can shed some light on this, that’d be very helpful.
Setting the position of the cameras from the tick increases the speed of the lerp transition, putting it ahead of the timeline completion. Luckily for me, players in my game can only transition from third-person to first-person when standing in a certain location. There’s no need to transition on the fly, so I set the world location for my camera variables on interaction instead of the tick, and that seemed to do the trick.
However, what if I did want my camera to transition from third-person to first-person on the fly. How would I get around the problem of the lag off the “Finished” pin?
If you use a smooth curve, there does seem to be a bit of a lag before the finished pin fires. Solution is just to add an event on the timeline about .5 secs before the end and use that pin instead.
You probably didn’t set the length of the timeline.
Either you need to set the length to your last key that you want the timeline to end on or set “Use last keyframe” to true in timeline (the button right next to the length), so it would do it regardless of the length.
You’re probably trying to lerp current location to new location.
What you need to do instead is use a static variable for the current location, basically save the location in a variable and then lerp it to the desired location.