private void DeactivateHover() { if (m_hoverMotor != null) { m_physicsScene.BeforeStep -= Hoverer; m_hoverMotor = null; } }
private void DeactivateSetForce() { if (m_forceMotor != null) { m_physicsScene.BeforeStep -= Mover; m_forceMotor = null; } }
// If a hover motor has not been created, create one and start the hovering. private void ActivateSetForce() { if (m_forceMotor == null) { // A fake motor that might be used someday m_forceMotor = new BSFMotor("setForce", 1f, 1f, 1f); m_physicsScene.BeforeStep += Mover; } }
// If a hover motor has not been created, create one and start the hovering. private void ActivateHover() { if (m_hoverMotor == null) { // Turning the target on m_hoverMotor = new BSFMotor("BSActorHover", m_controllingPrim.HoverTau, // timeScale BSMotor.Infinite, // decay time scale 1f // efficiency ); m_hoverMotor.SetTarget(ComputeCurrentHoverHeight()); m_hoverMotor.SetCurrent(m_controllingPrim.RawPosition.Z); m_hoverMotor.PhysicsScene = m_physicsScene; // DEBUG DEBUG so motor will output detail log messages. m_physicsScene.BeforeStep += Hoverer; } }
public BSActorHover(BSScene physicsScene, BSPhysObject pObj, string actorName) : base(physicsScene, pObj, actorName) { m_hoverMotor = null; m_physicsScene.DetailLog("{0},BSActorHover,constructor", m_controllingPrim.LocalID); }
public BSActorSetTorque(BSScene physicsScene, BSPhysObject pObj, string actorName) : base(physicsScene, pObj, actorName) { m_torqueMotor = null; m_physicsScene.DetailLog("{0},BSActorSetTorque,constructor", m_controllingPrim.LocalID); }
private void DeactivateSetTorque() { if (m_torqueMotor != null) { m_physicsScene.BeforeStep -= Mover; m_torqueMotor = null; } }
// If a hover motor has not been created, create one and start the hovering. private void ActivateSetTorque() { if (m_torqueMotor == null) { // A fake motor that might be used someday m_torqueMotor = new BSFMotor("setTorque", 1f, 1f, 1f, 1f); m_physicsScene.BeforeStep += Mover; } }