Hi, I have been working on a camera smoothly following a player for the past 2 days trying out different portions of events to no avail.
I am finding that the LERP function along with "scroll to" behavior keeps the camera lagging behind the player, mainly do to the fact that the player is moving, and the "x" value in LERP is too small and thus cannot catch up with the player when he is moving, only does so when he stops.
I was thinking that the "x" value needs to be a value that is exponentially growing from 0 to a value, lets say 0,03 in order to move ahead of the player after a short time while the player is still running, and then stopping ahead of the player at the "b" destination. The thing is I don't know how to implement a formula that would exponentially increase the value (accelerate) then exponentially decrease the value (decelerate).
I have tried nesting a LERP inside a LERP in the place of the "x" value but still cant work it out.
I would appreciate any help I have been pulling hairs lately.
Last edited by Solomon
on Tue Dec 01, 2015 1:54 pm, edited 1 time in total.
Brick by brick, stone by stone.