Sprite Velocity


velocity = GenGetSpriteVelocity(sprite)

Returns the sprite's current velocity in pixels per second. The velocity is in the sprite's current direction of travel.

velocityX = GenGetSpriteVelocityX(sprite)

Returns the sprite's X velocity vector. This is the pixels per second the sprite is moving in the X axis (direction).

velocityY = GenGetSpriteVelocityY(sprite)

Returns the sprite's Y velocity vector. This is the pixels per second the sprite is moving in the Y axis (direction).


Game Engine Overview







Become a Patron