aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs
diff options
context:
space:
mode:
authorRobert Adams2013-10-23 16:07:03 -0700
committerRobert Adams2013-10-23 16:07:03 -0700
commit511122834b5cd95839029d28365e479dc25eae9d (patch)
tree993b755b9f82dab3e225b26f5f12dc29778f0f17 /OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs
parentAdd current .NET windows framework requirement to README. (diff)
downloadopensim-SC-511122834b5cd95839029d28365e479dc25eae9d.zip
opensim-SC-511122834b5cd95839029d28365e479dc25eae9d.tar.gz
opensim-SC-511122834b5cd95839029d28365e479dc25eae9d.tar.bz2
opensim-SC-511122834b5cd95839029d28365e479dc25eae9d.tar.xz
BulletSim: change collision flags for groundplane to not interact with static objects.
Reorder collision flag setting code for terrain to fit pattern used elsewhere.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs b/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs
index c016eed..441d2d3 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs
@@ -138,13 +138,14 @@ public sealed class BSTerrainManager : IDisposable
138 m_groundPlane = m_physicsScene.PE.CreateBodyWithDefaultMotionState(groundPlaneShape, 138 m_groundPlane = m_physicsScene.PE.CreateBodyWithDefaultMotionState(groundPlaneShape,
139 BSScene.GROUNDPLANE_ID, Vector3.Zero, Quaternion.Identity); 139 BSScene.GROUNDPLANE_ID, Vector3.Zero, Quaternion.Identity);
140 140
141 // Everything collides with the ground plane.
142 m_groundPlane.collisionType = CollisionType.Groundplane;
143
141 m_physicsScene.PE.AddObjectToWorld(m_physicsScene.World, m_groundPlane); 144 m_physicsScene.PE.AddObjectToWorld(m_physicsScene.World, m_groundPlane);
142 m_physicsScene.PE.UpdateSingleAabb(m_physicsScene.World, m_groundPlane); 145 m_physicsScene.PE.UpdateSingleAabb(m_physicsScene.World, m_groundPlane);
146
143 // Ground plane does not move 147 // Ground plane does not move
144 m_physicsScene.PE.ForceActivationState(m_groundPlane, ActivationState.DISABLE_SIMULATION); 148 m_physicsScene.PE.ForceActivationState(m_groundPlane, ActivationState.DISABLE_SIMULATION);
145 // Everything collides with the ground plane.
146 m_groundPlane.collisionType = CollisionType.Groundplane;
147 m_groundPlane.ApplyCollisionMask(m_physicsScene);
148 149
149 BSTerrainPhys initialTerrain = new BSTerrainHeightmap(m_physicsScene, Vector3.Zero, BSScene.TERRAIN_ID, DefaultRegionSize); 150 BSTerrainPhys initialTerrain = new BSTerrainHeightmap(m_physicsScene, Vector3.Zero, BSScene.TERRAIN_ID, DefaultRegionSize);
150 lock (m_terrains) 151 lock (m_terrains)