diff options
author | Robert Adams | 2013-10-23 16:07:03 -0700 |
---|---|---|
committer | Robert Adams | 2013-10-23 16:07:03 -0700 |
commit | 511122834b5cd95839029d28365e479dc25eae9d (patch) | |
tree | 993b755b9f82dab3e225b26f5f12dc29778f0f17 /OpenSim/Region/Physics/BulletSPlugin/BSTerrainHeightmap.cs | |
parent | Add current .NET windows framework requirement to README. (diff) | |
download | opensim-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/BSTerrainHeightmap.cs')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSTerrainHeightmap.cs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainHeightmap.cs b/OpenSim/Region/Physics/BulletSPlugin/BSTerrainHeightmap.cs index c7deb4e..8888d6d 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainHeightmap.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSTerrainHeightmap.cs | |||
@@ -112,15 +112,14 @@ public sealed class BSTerrainHeightmap : BSTerrainPhys | |||
112 | m_physicsScene.PE.SetRestitution(m_mapInfo.terrainBody, BSParam.TerrainRestitution); | 112 | m_physicsScene.PE.SetRestitution(m_mapInfo.terrainBody, BSParam.TerrainRestitution); |
113 | m_physicsScene.PE.SetCollisionFlags(m_mapInfo.terrainBody, CollisionFlags.CF_STATIC_OBJECT); | 113 | m_physicsScene.PE.SetCollisionFlags(m_mapInfo.terrainBody, CollisionFlags.CF_STATIC_OBJECT); |
114 | 114 | ||
115 | m_mapInfo.terrainBody.collisionType = CollisionType.Terrain; | ||
116 | |||
115 | // Return the new terrain to the world of physical objects | 117 | // Return the new terrain to the world of physical objects |
116 | m_physicsScene.PE.AddObjectToWorld(m_physicsScene.World, m_mapInfo.terrainBody); | 118 | m_physicsScene.PE.AddObjectToWorld(m_physicsScene.World, m_mapInfo.terrainBody); |
117 | 119 | ||
118 | // redo its bounding box now that it is in the world | 120 | // redo its bounding box now that it is in the world |
119 | m_physicsScene.PE.UpdateSingleAabb(m_physicsScene.World, m_mapInfo.terrainBody); | 121 | m_physicsScene.PE.UpdateSingleAabb(m_physicsScene.World, m_mapInfo.terrainBody); |
120 | 122 | ||
121 | m_mapInfo.terrainBody.collisionType = CollisionType.Terrain; | ||
122 | m_mapInfo.terrainBody.ApplyCollisionMask(m_physicsScene); | ||
123 | |||
124 | // Make it so the terrain will not move or be considered for movement. | 123 | // Make it so the terrain will not move or be considered for movement. |
125 | m_physicsScene.PE.ForceActivationState(m_mapInfo.terrainBody, ActivationState.DISABLE_SIMULATION); | 124 | m_physicsScene.PE.ForceActivationState(m_mapInfo.terrainBody, ActivationState.DISABLE_SIMULATION); |
126 | 125 | ||