示例#1
0
 private void DeactivateAvatarMove()
 {
     if (m_velocityMotor != null)
     {
         m_physicsScene.BeforeStep -= Mover;
         m_velocityMotor            = null;
     }
 }
示例#2
0
        // If a hover motor has not been created, create one and start the hovering.
        private void ActivateAvatarMove()
        {
            if (m_velocityMotor == null)
            {
                // Infinite decay and timescale values so motor only changes current to target values.
                m_velocityMotor = new BSVMotor("BSCharacter.Velocity",
                                               0.2f,                            // time scale
                                               BSMotor.Infinite,                // decay time scale
                                               BSMotor.InfiniteVector,          // friction timescale
                                               1f                               // efficiency
                                               );
                SetVelocityAndTarget(m_controllingPrim.RawVelocity, m_controllingPrim.TargetVelocity, true /* inTaintTime */, 0);

                m_physicsScene.BeforeStep += Mover;
            }
        }
示例#3
0
 public BSActorAvatarMove(BSScene physicsScene, BSPhysObject pObj, string actorName)
     : base(physicsScene, pObj, actorName)
 {
     m_velocityMotor = null;
     m_physicsScene.DetailLog("{0},BSActorAvatarMove,constructor", m_controllingPrim.LocalID);
 }