Get Sprite Angle To


angle = GenGetSpriteAngleTo(sprite1, sprite2)

angle = GenGetSpriteAngleToXY(sprite, x, y)

These functions return the angle between a sprite and another sprite or another coordinate. The angle is returned in degrees. The angle returned can be used as a direction to move towards. The pivot point of the sprite is used when calculating the angle. By default the pivot point is the center of the sprite.


Game Engine Overview







Become a Patron