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

Method setIsSimulationCollider

src/collision/Collider.cpp:271–287  ·  view source on GitHub ↗

Set whether the collider can generate contacts for the simulation of the associated body 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 trigger. * @param isSimulationCollider True if this collider can generate contacts for the simulation of the * associated body. */

Source from the content-addressed store, hash-verified

269 * associated body.
270 */
271void Collider::setIsSimulationCollider(bool isSimulationCollider) const {
272
273 mBody->mWorld.mCollidersComponents.setIsSimulationCollider(mEntity, isSimulationCollider);
274
275 if (isSimulationCollider) {
276
277 mBody->mWorld.mBodyComponents.setHasSimulationCollider(mBody->getEntity(), true);
278 }
279 else {
280 mBody->updateHasSimulationCollider();
281 }
282
283 // The collider cannot be a trigger anymore
284 if (isSimulationCollider && getIsTrigger()) {
285 setIsTrigger(false);
286 }
287}
288
289// Return true if the collider will be part of results of queries on the PhysicsWorld
290bool Collider::getIsWorldQueryCollider() const {

Callers 11

TestPointInsideMethod · 0.45
TestRaycastMethod · 0.45
TestWorldQueriesMethod · 0.45
ConcaveMeshMethod · 0.45
DumbbellMethod · 0.45
ConvexMeshMethod · 0.45
BoxMethod · 0.45
CapsuleMethod · 0.45
HeightFieldMethod · 0.45
SphereMethod · 0.45
ConvexHullMethod · 0.45

Calls 3

getEntityMethod · 0.45

Tested by 3

TestPointInsideMethod · 0.36
TestRaycastMethod · 0.36
TestWorldQueriesMethod · 0.36