GenSetSpriteCollisionRadius


GenSetSpriteCollisionRadius sprite, radius

sprite

Game Engine sprite object to set.

radius

The collision detection radius for the sprite.


The auto collision detection system depends on a few approximations to achieve it's speed. One of these approximations is that collision detection is computed by using the distance between two sprites. Each sprite has a collision radius. This means that collisions occur in a circle around the pivot point (usually the center) of a sprite.

If the distance from the pivot point of sprite 1 to the pivot point of sprite 2 is less than the combined collision radius of sprite 1 plus sprite 2, the sprites are in collision.


Game Engine Overview







Become a Patron