aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs
diff options
context:
space:
mode:
authorRobert Adams2014-04-28 11:08:47 -0700
committerRobert Adams2014-04-28 11:08:47 -0700
commit63aea3a5f281ac396787beab5615214b36e2332e (patch)
tree5fca14829eb458bb7d2cf199ac1215ef21f4629f /OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs
parentRemoved dependency on Linq in OpenProfileClient (diff)
downloadopensim-SC-63aea3a5f281ac396787beab5615214b36e2332e.zip
opensim-SC-63aea3a5f281ac396787beab5615214b36e2332e.tar.gz
opensim-SC-63aea3a5f281ac396787beab5615214b36e2332e.tar.bz2
opensim-SC-63aea3a5f281ac396787beab5615214b36e2332e.tar.xz
BUlletSim: move safeynet ground plane to lower altitude. Define new BulletSim
parameter 'TerrainGroundPlane' which defaults to -500. BulletSim had assumed altitudes never went negative but that is not true. The ground plane is just a safety net so things wouldn't fall to infinity.
Diffstat (limited to '')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs b/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs
index 3013077..9067a2c 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs
@@ -136,9 +136,10 @@ public sealed class BSTerrainManager : IDisposable
136 { 136 {
137 DetailLog("{0},BSTerrainManager.CreateInitialGroundPlaneAndTerrain,region={1}", BSScene.DetailLogZero, m_physicsScene.RegionName); 137 DetailLog("{0},BSTerrainManager.CreateInitialGroundPlaneAndTerrain,region={1}", BSScene.DetailLogZero, m_physicsScene.RegionName);
138 // The ground plane is here to catch things that are trying to drop to negative infinity 138 // The ground plane is here to catch things that are trying to drop to negative infinity
139 BulletShape groundPlaneShape = m_physicsScene.PE.CreateGroundPlaneShape(BSScene.GROUNDPLANE_ID, 1f, BSParam.TerrainCollisionMargin); 139 BulletShape groundPlaneShape = m_physicsScene.PE.CreateGroundPlaneShape(BSScene.GROUNDPLANE_ID, 1f, BSParam.TerrainCollisionMargin);
140 Vector3 groundPlaneAltitude = new Vector3(0f, 0f, BSParam.TerrainGroundPlane);
140 m_groundPlane = m_physicsScene.PE.CreateBodyWithDefaultMotionState(groundPlaneShape, 141 m_groundPlane = m_physicsScene.PE.CreateBodyWithDefaultMotionState(groundPlaneShape,
141 BSScene.GROUNDPLANE_ID, Vector3.Zero, Quaternion.Identity); 142 BSScene.GROUNDPLANE_ID, groundPlaneAltitude, Quaternion.Identity);
142 143
143 // Everything collides with the ground plane. 144 // Everything collides with the ground plane.
144 m_groundPlane.collisionType = CollisionType.Groundplane; 145 m_groundPlane.collisionType = CollisionType.Groundplane;