Exemplo n.º 1
0
 // Usually called when target velocity changes to set the current velocity and the target
 //     into the movement motor.
 public void SetVelocityAndTarget(OMV.Vector3 vel, OMV.Vector3 targ, bool inTaintTime)
 {
     m_physicsScene.TaintedObject(inTaintTime, m_controllingPrim.LocalID, "BSActorAvatarMove.setVelocityAndTarget", delegate()
     {
         if (m_velocityMotor != null)
         {
             m_velocityMotor.Reset();
             m_velocityMotor.SetTarget(targ);
             m_velocityMotor.SetCurrent(vel);
             m_velocityMotor.Enabled = true;
             m_physicsScene.DetailLog("{0},BSCharacter.MoveMotor,SetVelocityAndTarget,vel={1}, targ={2}",
                                      m_controllingPrim.LocalID, vel, targ);
             m_waitingForLowVelocityForStationary = 0;
         }
     });
 }
        // Usually called when target velocity changes to set the current velocity and the target
        //     into the movement motor.
        public void SetVelocityAndTarget(OMV.Vector3 vel, OMV.Vector3 targ, bool inTaintTime)
        {
            m_physicsScene.TaintedObject(inTaintTime, m_controllingPrim.LocalID, "BSActorAvatarMove.setVelocityAndTarget", delegate()
            {
                if (m_velocityMotor != null)
                {
//                    if (targ == OMV.Vector3.Zero)
//                        Util.PrintCallStack();
//
//                    Console.WriteLine("SetVelocityAndTarget, {0} {1}", vel, targ);
                    m_velocityMotor.Reset();
                    m_velocityMotor.SetTarget(targ);
                    m_velocityMotor.SetCurrent(vel);
                    m_velocityMotor.Enabled = true;
                }
            });
        }