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

Method OnPhysicsSceneChanged

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

Source from the content-addressed store, hash-verified

607}
608
609void RigidBody::OnPhysicsSceneChanged(PhysicsScene* previous)
610{
611 PhysicsBackend::RemoveSceneActor(previous->GetPhysicsScene(), _actor, true);
612 void* scene = GetPhysicsScene()->GetPhysicsScene();
613 PhysicsBackend::AddSceneActor(scene, _actor);
614 const bool putToSleep = !_startAwake && GetEnableSimulation() && !GetIsKinematic() && IsActiveInHierarchy();
615 if (putToSleep)
616 PhysicsBackend::AddSceneActorAction(scene, _actor, PhysicsBackend::ActionType::Sleep);
617}

Callers

nothing calls this directly

Calls 4

GetPhysicsSceneFunction · 0.85
GetEnableSimulationFunction · 0.85
IsActiveInHierarchyFunction · 0.85
GetPhysicsSceneMethod · 0.80

Tested by

no test coverage detected