Hi guys.
I have a problem with lerp.
I have two objects that I've managed to successfully move towards a designated position using lerp.
Using Set Position I have:
lerp(Blocks.X,Den.ImagePointX(0),0.01)
lerp(Blocks.Y,Den.ImagePointY(0),0.01)
Where Blocks.X and Blocks.Y are the X and Y coordinates to the object to move and Den.ImagePointX(0) and Den.ImagePointY(0) are the coordinates of the target destination. 0.01 seems to be a good speed at which to move my objects. Unless I've missed something.
Anyway, my problem is, my moving objects never seem to actually reach their destination.
It looks to me like the distance between the moving objects is calculated, moved slightly, then the distance is calculated again.... Over a brief time, the moving objects get slower and slower and the distance travelled on each click is less and less.
What have I done wrong?
Cheers.