Esempio n. 1
0
 void AreaEffect::RemoveFromWorld()
 {
     Physics::PhysicsManager* PhysMan = Entresol::GetSingletonPtr()->GetPhysicsManager();
     btSoftRigidDynamicsWorld* BWorld = PhysMan->_GetPhysicsWorldPointer();
     //first remove any collision metadata
     /*if( !CurrentCollisions.empty() )
     {
         PhysMan->RemoveCollisionsContainingActor(this);
     }// */
     BWorld->removeCollisionObject(this->PhysicsObject);
     this->DetachFromGraphics();
     DetachAllChildren();
 }
Esempio n. 2
0
    void ActorRigid::RemoveFromWorld()
    {
        if( !IsInWorld() )
            return;

        try{
            Physics::PhysicsManager* PhysMan = Entresol::GetSingletonPtr()->GetPhysicsManager();
            btSoftRigidDynamicsWorld* BWorld = PhysMan->_GetPhysicsWorldPointer();
            BWorld->removeRigidBody(this->PhysicsRigidBody);
            DetachAllChildren();
        }catch (...) {
            Entresol::GetSingletonPtr()->Log("Failed to locate PhysicsManager While Destructing ActorRigid. This is not a problem if already shutting down.");
        }

        //first remove any collision metadata
        /*if( !CurrentCollisions.empty() )
        {
            PhysMan->RemoveCollisionsContainingActor(this);
        }// */

        this->DetachFromGraphics();
    }