| 607 | } |
| 608 | |
| 609 | void 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 | } |
nothing calls this directly
no test coverage detected