MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / Destroy

Method Destroy

src/PhysicsSolver.cpp:198–204  ·  view source on GitHub ↗

Remove the entity from the physics system. This does NOT destroy it in the World. @param e the entity to remove */

Source from the content-addressed store, hash-verified

196 @param e the entity to remove
197 */
198void PhysicsSolver::Destroy(Ref<Entity> e){
199 auto body = e->Components().GetComponent<PhysicsBodyComponent>();
200 objects.remove(body);
201 scene->removeActor(*(body->rigidActor));
202 body->rigidActor->release();
203 body->rigidActor = nullptr;
204}
205
206/**
207 Run the appropriate number of physics time steps given a frame rate scale

Callers

nothing calls this directly

Calls 3

removeMethod · 0.45
removeActorMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected