aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin
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
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')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs16
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs7
2 files changed, 11 insertions, 12 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;
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs b/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
index 892c34b..2d7a4a0 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
@@ -620,8 +620,7 @@ public sealed class BSShapeCollection : IDisposable
620 } 620 }
621 else 621 else
622 { 622 {
623 // Pass false for physicalness as this creates some sort of bounding box which we don't need 623 meshData = PhysicsScene.mesher.CreateMesh(objName, pbs, size, lod, true, false, false, false);
624 meshData = PhysicsScene.mesher.CreateMesh(objName, pbs, size, lod, false);
625 624
626 if (meshData != null) 625 if (meshData != null)
627 { 626 {
@@ -694,8 +693,8 @@ public sealed class BSShapeCollection : IDisposable
694 else 693 else
695 { 694 {
696 // Build a new hull in the physical world 695 // Build a new hull in the physical world
697 // Pass false for physicalness as this creates some sort of bounding box which we don't need 696 // Pass true for physicalness as this creates some sort of bounding box which we don't need
698 IMesh meshData = PhysicsScene.mesher.CreateMesh(objName, pbs, size, lod, false); 697 IMesh meshData = PhysicsScene.mesher.CreateMesh(objName, pbs, size, lod, true, false, false, false);
699 if (meshData != null) 698 if (meshData != null)
700 { 699 {
701 700