aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin/ODEPrim.cs')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODEPrim.cs11
1 files changed, 5 insertions, 6 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
index 13c69d6..e347fdc 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -114,7 +114,6 @@ namespace OpenSim.Region.Physics.OdePlugin
114 private float m_PIDTau; 114 private float m_PIDTau;
115 private float PID_D = 35f; 115 private float PID_D = 35f;
116 private float PID_G = 25f; 116 private float PID_G = 25f;
117 private bool m_usePID;
118 117
119 // KF: These next 7 params apply to llSetHoverHeight(float height, integer water, float tau), 118 // KF: These next 7 params apply to llSetHoverHeight(float height, integer water, float tau),
120 // and are for non-VEHICLES only. 119 // and are for non-VEHICLES only.
@@ -1723,7 +1722,7 @@ Console.WriteLine(" JointCreateFixed");
1723 // gravityz multiplier = 1 - m_buoyancy 1722 // gravityz multiplier = 1 - m_buoyancy
1724 fz = _parent_scene.gravityz * (1.0f - m_buoyancy) * m_mass; 1723 fz = _parent_scene.gravityz * (1.0f - m_buoyancy) * m_mass;
1725 1724
1726 if (m_usePID) 1725 if (PIDActive)
1727 { 1726 {
1728//Console.WriteLine("PID " + Name); 1727//Console.WriteLine("PID " + Name);
1729 // KF - this is for object move? eg. llSetPos() ? 1728 // KF - this is for object move? eg. llSetPos() ?
@@ -1792,10 +1791,10 @@ Console.WriteLine(" JointCreateFixed");
1792 1791
1793 fz = fz + ((_target_velocity.Z - vel.Z) * (PID_D) * m_mass); 1792 fz = fz + ((_target_velocity.Z - vel.Z) * (PID_D) * m_mass);
1794 } 1793 }
1795 } // end if (m_usePID) 1794 } // end if (PIDActive)
1796 1795
1797 // Hover PID Controller needs to be mutually exlusive to MoveTo PID controller 1796 // Hover PID Controller needs to be mutually exlusive to MoveTo PID controller
1798 if (m_useHoverPID && !m_usePID) 1797 if (m_useHoverPID && !PIDActive)
1799 { 1798 {
1800//Console.WriteLine("Hover " + Name); 1799//Console.WriteLine("Hover " + Name);
1801 1800
@@ -2866,7 +2865,7 @@ Console.WriteLine(" JointCreateFixed");
2866 // it does make sense to do this for tiny little instabilities with physical prim, however 0.5m/frame is fairly large. 2865 // it does make sense to do this for tiny little instabilities with physical prim, however 0.5m/frame is fairly large.
2867 // reducing this to 0.02m/frame seems to help the angular rubberbanding quite a bit, however, to make sure it doesn't affect elevators and vehicles 2866 // reducing this to 0.02m/frame seems to help the angular rubberbanding quite a bit, however, to make sure it doesn't affect elevators and vehicles
2868 // adding these logical exclusion situations to maintain this where I think it was intended to be. 2867 // adding these logical exclusion situations to maintain this where I think it was intended to be.
2869 if (m_throttleUpdates || m_usePID || (m_vehicle != null && m_vehicle.Type != Vehicle.TYPE_NONE) || (Amotor != IntPtr.Zero)) 2868 if (m_throttleUpdates || PIDActive || (m_vehicle != null && m_vehicle.Type != Vehicle.TYPE_NONE) || (Amotor != IntPtr.Zero))
2870 { 2869 {
2871 m_minvelocity = 0.5f; 2870 m_minvelocity = 0.5f;
2872 } 2871 }
@@ -2947,7 +2946,7 @@ Console.WriteLine(" JointCreateFixed");
2947 m_log.WarnFormat("[PHYSICS]: Got NaN PIDTarget from Scene on Object {0}", Name); 2946 m_log.WarnFormat("[PHYSICS]: Got NaN PIDTarget from Scene on Object {0}", Name);
2948 } 2947 }
2949 } 2948 }
2950 public override bool PIDActive { set { m_usePID = value; } } 2949 public override bool PIDActive { get; set; }
2951 public override float PIDTau { set { m_PIDTau = value; } } 2950 public override float PIDTau { set { m_PIDTau = value; } }
2952 2951
2953 public override float PIDHoverHeight { set { m_PIDHoverHeight = value; ; } } 2952 public override float PIDHoverHeight { set { m_PIDHoverHeight = value; ; } }