Get Sprite Center XY


centerX = GenGetSpriteCenterX(sprite)

centerY = GenGetSpriteCenterY(sprite)

These functions return the screen coordinates (X and Y) of the current center of the sprite. It's often convenient to position a sprite by either it's center or it's pivot point.


Game Engine Overview







Become a Patron