aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
diff options
context:
space:
mode:
authorMelanie2012-11-30 01:54:13 +0000
committerMelanie2012-11-30 01:54:13 +0000
commit56b2bc71017ebec9fe4b7ecd358819c8d7499f76 (patch)
treeeea2b7a38ef1c191e41928f12cefe2254a4454e0 /OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
parentMerge branch 'master' into careminster (diff)
parentBulletSim: add expanded call to IMesher/Meshmerizer which enables/disables me... (diff)
downloadopensim-SC-56b2bc71017ebec9fe4b7ecd358819c8d7499f76.zip
opensim-SC-56b2bc71017ebec9fe4b7ecd358819c8d7499f76.tar.gz
opensim-SC-56b2bc71017ebec9fe4b7ecd358819c8d7499f76.tar.bz2
opensim-SC-56b2bc71017ebec9fe4b7ecd358819c8d7499f76.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/Physics/Manager/IMesher.cs
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs16
1 files changed, 8 insertions, 8 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
index 3a73fba..a398b74 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
@@ -742,22 +742,22 @@ namespace OpenSim.Region.Physics.BulletSPlugin
742 else 742 else
743 { 743 {
744 float verticalError = pos.Z - m_VhoverTargetHeight; 744 float verticalError = pos.Z - m_VhoverTargetHeight;
745 // RA: where does the 50 come from? 745 float verticalCorrectionVelocity = pTimestep * (verticalError / m_VhoverTimescale);
746 float verticalCorrectionVelocity = pTimestep * ((verticalError * 50.0f) / m_VhoverTimescale); 746
747 // Replace Vertical speed with correction figure if significant 747 // TODO: implement m_VhoverEfficiency
748 if (verticalError > 0.01f) 748 if (verticalError > 0.01f)
749 { 749 {
750 ret = new Vector3(0f, 0f, verticalCorrectionVelocity); 750 // If error is positive (we're above the target height), push down
751 //KF: m_VhoverEfficiency is not yet implemented 751 ret = new Vector3(0f, 0f, -verticalCorrectionVelocity);
752 } 752 }
753 else if (verticalError < -0.01) 753 else if (verticalError < -0.01)
754 { 754 {
755 ret = new Vector3(0f, 0f, -verticalCorrectionVelocity); 755 ret = new Vector3(0f, 0f, verticalCorrectionVelocity);
756 } 756 }
757 } 757 }
758 758
759 VDetailLog("{0},MoveLinear,hover,pos={1},dir={2},height={3},target={4}", 759 VDetailLog("{0},MoveLinear,hover,pos={1},ret={2},hoverTS={3},height={4},target={5}",
760 Prim.LocalID, pos, ret, m_VhoverHeight, m_VhoverTargetHeight); 760 Prim.LocalID, pos, ret, m_VhoverTimescale, m_VhoverHeight, m_VhoverTargetHeight);
761 } 761 }
762 762
763 return ret; 763 return ret;