예제 #1
0
 public override void AddForce(OMV.Vector3 force, bool pushforce)
 {
     if (force.IsFinite())
     {
         _force.X += force.X;
         _force.Y += force.Y;
         _force.Z += force.Z;
         // m_log.DebugFormat("{0}: AddForce. adding={1}, newForce={2}", LogHeader, force, _force);
         PhysicsScene.TaintedObject("BSCharacter.AddForce", delegate()
         {
             DetailLog("{0},BSCharacter.setAddForce,taint,addedForce={1}", LocalID, _force);
             BulletSimAPI.SetObjectForce2(BSBody.ptr, _force);
         });
     }
     else
     {
         m_log.ErrorFormat("{0}: Got a NaN force applied to a Character", LogHeader);
     }
     //m_lastUpdateSent = false;
 }