Module rusty_engine::physics

source ·
Expand description

Rusty Engine’s custom collision detection implementation.

Structs

  • This is the struct that is generated when a collision occurs. Collisions only occur between two Sprites which:
  • Contains the labels of the two sprites involved in the collision. As the labels are unordered, several convenience methods are provided for searching the values.

Enums

  • Represents the collider (or lack thereof) of a sprite. Two sprites need to have colliders AND have their Sprite.collision fields set to true to generate collision events. See the collider example to create your own colliders
  • Indicates whether a CollisionEvent is at the beginning or ending of a collision.