MageFlight / merlin-game-engine

GNU General Public License v3.0
1 stars 0 forks source link

Implement collision layers and masks #5

Closed MageFlight closed 1 year ago

MageFlight commented 1 year ago

When checking for collisions, the physics engine will check the collision layer and collision mask of colliderA and colliderB. If there is not overlap, then the possibility of a collision is discarded. If the engine detects that the colliding shape is not visible, then it will not check for collisions with it.

The collision layer and mask must be passed into the constructors of any physics body that extends from CollisionBody.