29 using System.Collections.Generic;
33 using OpenSim.Region.PhysicsModules.SharedBase;
35 using OMV = OpenMetaverse;
37 namespace OpenSim.Region.PhysicsModule.BulletS
44 : base(physicsScene, pObj, actorName)
47 m_physicsScene.DetailLog(
"{0},BSActorSetForce,constructor", m_controllingPrim.LocalID);
51 public override bool isActive
53 get {
return Enabled && m_controllingPrim.IsPhysicallyActive; }
69 m_physicsScene.DetailLog(
"{0},BSActorSetForce,refresh", m_controllingPrim.LocalID);
72 if (m_controllingPrim.RawForce ==
OMV.Vector3.Zero)
74 m_physicsScene.DetailLog(
"{0},BSActorSetForce,refresh,notSetForce,removing={1}", m_controllingPrim.LocalID, ActorName);
100 private void ActivateSetForce()
102 if (m_forceMotor == null)
105 m_forceMotor =
new BSFMotor(
"setForce", 1f, 1f, 1f);
107 m_physicsScene.BeforeStep += Mover;
111 private void DeactivateSetForce()
113 if (m_forceMotor != null)
115 m_physicsScene.BeforeStep -= Mover;
121 private void Mover(
float timeStep)
127 m_physicsScene.DetailLog(
"{0},BSActorSetForce,preStep,force={1}", m_controllingPrim.LocalID, m_controllingPrim.RawForce);
128 if (m_controllingPrim.PhysBody.HasPhysicalBody)
130 m_physicsScene.PE.ApplyCentralForce(m_controllingPrim.PhysBody, m_controllingPrim.RawForce);
131 m_controllingPrim.ActivateIfPhysical(
false);
override void RemoveDependencies()
Each physical object can have 'actors' who are pushing the object around. This can be used for hover...
BSActorSetForce(BSScene physicsScene, BSPhysObject pObj, string actorName)