Mask for collider groups #8887
Labels
editor
Issues related to the Defold editor
engine
Issues related to the Defold engine
feature request
A suggestion for a new feature
physics
Issues related to physics (2D and/or 3D)
Problem: Setting up collision filtering for physics.
Imagine a game with three types of monsters: ground, flying, and ghosts. Ground monsters should collide with other ground monsters. Flying monsters should collide with other flying monsters. Ghosts should be able to move through any monsters. All monsters should collide with the hero's weapons. With the current system of setting collider groups, it's inconvenient to configure such behavior. It will be even more inconvenient to add a new type of monster.
Possible solution:
Allow setting a group as a mask. For example: "enemy, ghost" or "enemy, flying". In Box2d, there is already a possibility for such a setup: https://www.iforce2d.net/b2dtut/collision-filtering
The text was updated successfully, but these errors were encountered: