Collision Response Filter |
This section shows how collision response can be selectively disabled.
Collision response models the behavior of two colliding bodies. The simulation makes sure that two bodies will not penetrate each other and bounce off of each other. In some cases it is necessary to disable collision response between a pair of rigid bodies. When the collision response is disabled, the collision detection will detect collisions between the rigid bodies, but the simulation will not create contact constraints. The bodies will move through each other without resistance.
Per default, collision response is enabled for all rigid bodies. Collision response can be disabled for an individual rigid body using the CollisionResponseEnabled property of the RigidBody class. It is also possible to disable collision response for specific pairs of rigid bodies using a collision response filter. A filter can be set for the simulation in the ResponseFilter property. The default filter implementation is CollisionResponseFilter but custom filters can be implemented as well.
Please note that the collision response filter does not define whether collision detection is enabled or not. To disable collision detection between rigid bodies use the collision filter of the collision detection. See also Collision Filtering.