GenSetSpriteVelocity


GenSetSpriteVelocity sprite, velocity {, angle}

sprite

Game Engine sprite object to set.

velocity

The new sprite velocity in pixels per second.

angle

This optional parameter specifies the direction to move. If not specified the velocity will be set in the current direction of travel. If the sprite is stopped, the sprite velocity will be set in the direction of rotation so that the sprite will move forward.


Game Engine Overview







Become a Patron