Remove the entity from the physics system. This does NOT destroy it in the World. @param e the entity to remove */
| 196 | @param e the entity to remove |
| 197 | */ |
| 198 | void 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 |
nothing calls this directly
no test coverage detected