Hello! I would like to get the current movement speed (in pixels/frame) of a sprite. It would even be enough for one dimension.
I believe the formula would be:
(sprite.X() - sprite.*previousFrame*X()) / TimeDelta()
However, I can’t find a way to store the position of the previous frame.
Is there an easy way to do this?
EDIT:
I think I figured it out . I was always trying to save the previous position to a variable at the top of the event list. This would always make the variable previousPosition and the current position equal. I just tried again and moved the event where the variable is set to the bottom of the list.