Esempio n. 1
0
        internal void Disable(AuroraPhysXPrim parent)
        {
            if (!m_enabled)
                return;
            m_enabled = false;

            parent.SetMaterial((int)m_previousMaterial, false); //Revert to the original

            parent.ThrottleUpdates = true;
            //d.BodyDisable(Body);
            m_linearMotorDirection = Vector3.Zero;
            m_linearMotorDirectionLASTSET = Vector3.Zero;
            m_angularMotorDirection = Vector3.Zero;
        }
Esempio n. 2
0
        }//end SetDefaultsForType

        internal void Enable(IntPtr pBody, AuroraPhysXPrim parent, AuroraODEPhysicsScene pParentScene)
        {
            if (m_enabled)
                return;
            m_enabled = true;
            m_previousMaterial = (Material)parent.m_material;
            parent.SetMaterial((int)Material.Glass, false); //This seems to happen in SL... and its needed for here
            parent.ThrottleUpdates = false;
            m_body = pBody;
            if (pBody == IntPtr.Zero || m_type == Vehicle.TYPE_NONE)
                return;
            GetMass (pBody);
        }