MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / SetEnableSimulation

Method SetEnableSimulation

Source/Engine/Physics/Actors/RigidBody.cpp:63–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63void RigidBody::SetEnableSimulation(bool value)
64{
65 if (value == GetEnableSimulation())
66 return;
67 _enableSimulation = value;
68 if (_actor)
69 {
70 const bool isActive = _enableSimulation && IsActiveInHierarchy();
71 PhysicsBackend::SetActorFlag(_actor, PhysicsBackend::ActorFlags::NoSimulation, !isActive);
72 if (isActive && GetStartAwake())
73 WakeUp();
74 }
75}
76
77void RigidBody::SetUseCCD(bool value)
78{

Callers

nothing calls this directly

Calls 3

GetEnableSimulationFunction · 0.85
IsActiveInHierarchyFunction · 0.85
GetStartAwakeFunction · 0.85

Tested by

no test coverage detected