aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODEPrim.cs16
1 files changed, 15 insertions, 1 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
index 3056f67..1b47754 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -2600,6 +2600,7 @@ Console.WriteLine(" JointCreateFixed");
2600 { 2600 {
2601 Vector3 pv = Vector3.Zero; 2601 Vector3 pv = Vector3.Zero;
2602 bool lastZeroFlag = _zeroFlag; 2602 bool lastZeroFlag = _zeroFlag;
2603 float m_minvelocity = 0;
2603 if (Body != (IntPtr)0) // FIXME -> or if it is a joint 2604 if (Body != (IntPtr)0) // FIXME -> or if it is a joint
2604 { 2605 {
2605 d.Vector3 vec = d.BodyGetPosition(Body); 2606 d.Vector3 vec = d.BodyGetPosition(Body);
@@ -2752,8 +2753,21 @@ Console.WriteLine(" JointCreateFixed");
2752 _acceleration = ((_velocity - m_lastVelocity) / 0.1f); 2753 _acceleration = ((_velocity - m_lastVelocity) / 0.1f);
2753 _acceleration = new Vector3(_velocity.X - m_lastVelocity.X / 0.1f, _velocity.Y - m_lastVelocity.Y / 0.1f, _velocity.Z - m_lastVelocity.Z / 0.1f); 2754 _acceleration = new Vector3(_velocity.X - m_lastVelocity.X / 0.1f, _velocity.Y - m_lastVelocity.Y / 0.1f, _velocity.Z - m_lastVelocity.Z / 0.1f);
2754 //m_log.Info("[PHYSICS]: V1: " + _velocity + " V2: " + m_lastVelocity + " Acceleration: " + _acceleration.ToString()); 2755 //m_log.Info("[PHYSICS]: V1: " + _velocity + " V2: " + m_lastVelocity + " Acceleration: " + _acceleration.ToString());
2756
2757 // Note here that linearvelocity is affecting angular velocity... so I'm guessing this is a vehicle specific thing...
2758 // it does make sense to do this for tiny little instabilities with physical prim, however 0.5m/frame is fairly large.
2759 // 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
2760 // adding these logical exclusion situations to maintain this where I think it was intended to be.
2761 if (m_throttleUpdates || m_usePID || (m_vehicle != null && m_vehicle.Type != Vehicle.TYPE_NONE) || (Amotor != IntPtr.Zero))
2762 {
2763 m_minvelocity = 0.5f;
2764 }
2765 else
2766 {
2767 m_minvelocity = 0.02f;
2768 }
2755 2769
2756 if (_velocity.ApproxEquals(pv, 0.5f)) 2770 if (_velocity.ApproxEquals(pv, m_minvelocity))
2757 { 2771 {
2758 m_rotationalVelocity = pv; 2772 m_rotationalVelocity = pv;
2759 } 2773 }