Or click on an image below (not all elements are present here):
Generates smooth animated movements between two coordinates for a collection of pygame Rects or thorpy Elements.
Tagged examples: anim_move

add(self, element, target_pos, vmax=1., remove_if_already_moving=True)
Register a movement for a Rect or an element. The element will move from where it is now up to the target_pos.
Mandatory arguments
element : either a pygame Rect or a thorpy element.
target_pos : (2-tuple) coordinates of the target position.
Optionnal arguments
vmax : (float) the maximum velocity during the movement.
remove_if_already_moving : (bool) if True, then an object cannot be part of two movements at the same time. You probably want it True !

Function to be called each frame of the app to update objects position as a part of the movement animation.