MCPcopy Create free account
hub / github.com/DanielChappuis/reactphysics3d / setIsTrigger

Method setIsTrigger

src/collision/Collider.cpp:250–257  ·  view source on GitHub ↗

Set whether the collider is a trigger Note that a collider cannot be a simulation collider and a trigger at the same time. If you set this to true, this collider will stop being a simulation collider. * @param isTrigger True if you want to set this collider as a trigger and false otherwise */

Source from the content-addressed store, hash-verified

248 * @param isTrigger True if you want to set this collider as a trigger and false otherwise
249 */
250void Collider::setIsTrigger(bool isTrigger) const {
251 mBody->mWorld.mCollidersComponents.setIsTrigger(mEntity, isTrigger);
252
253 // The collider cannot be a simulation collider anymore
254 if (isTrigger && getIsSimulationCollider()) {
255 setIsSimulationCollider(false);
256 }
257}
258
259// Return true if the collider can generate contacts for the simulation of the associated body
260bool Collider::getIsSimulationCollider() const {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected