Rotation method in pyleap



Rotation: 

Sets the rotation angle. Default is 0 or 360 degrees. The anchor of rotation by default will be at the center of the sprite and the rotation happens in an anti-clockwise direction.

Syntax:

object.rotation = 90  # object will rotates at 90 degree

set_anchor(x, y):

Sets an anchor point for the rotation of a sprite to x and y.

(OR)

Sets the center point of the shape deformation, the parameter is the coordinate value.

object.set_anchor(100, 100) # object will rotates at a coordinates of (100, 100)