gamedev:collisionfiltering
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |
gamedev:collisionfiltering [2020/04/03 10:20] – url move dragonlord | gamedev:collisionfiltering [2024/03/14 16:46] (current) – dragonlord |
---|
| |
====== Collision Filtering ====== | ====== Collision Filtering ====== |
Collision filtering is used in the first place for collision detection with [[http://developer.dragondreams.ch/docs/dragengine/latest/classdeCollider.html|colliders]]. They are though used also in other places where groups of elements have to be checked for interacting with each other or not. The main use is though for collision detection. | Collision filtering is used in the first place for collision detection with #@LinkApiDocDE2_HTML~classdeCollider.html,colliders~@#. They are though used also in other places where groups of elements have to be checked for interacting with each other or not. The main use is though for collision detection. |
| |
A [[http://developer.dragondreams.ch/docs/dragengine/latest/classdecCollisionFilter.html|collision filter]] composes of a category and filter layer mask. A [[http://developer.dragondreams.ch/docs/dragengine/latest/classdecLayerMask.html|layer mask]] is a 64-bit bit flag value. Each bit can be individually set or cleared. 64 bits should be enough for the most complex filtering problems. Layer masks match each other if they share one or more set bits. Layer masks with no bits set do not match other layer masks even if they have no bits set either. | A #@LinkApiDocDE2_HTML~classdecCollisionFilter.html,collision filter~@# composes of a category and filter layer mask. A #@LinkApiDocDE2_HTML~classdecLayerMask.html,layer mask~@# is a 64-bit bit flag value. Each bit can be individually set or cleared. 64 bits should be enough for the most complex filtering problems. Layer masks match each other if they share one or more set bits. Layer masks with no bits set do not match other layer masks even if they have no bits set either. |
| |
The category usually denotes what kind of type a collider belongs to. Typically this has only one bit set but more complex configurations are possible. For example it is possible to have disjoint groups of bits. A category could then have one bit set from each category. | The category usually denotes what kind of type a collider belongs to. Typically this has only one bit set but more complex configurations are possible. For example it is possible to have disjoint groups of bits. A category could then have one bit set from each category. |
gamedev/collisionfiltering.txt · Last modified: 2024/03/14 16:46 by dragonlord