BulletSim: fix exception when re-creating the terrain when loading an OAR file
parent
2e5222055f
commit
599dbc3d95
|
@ -142,6 +142,8 @@ public sealed class BSTerrainMesh : BSTerrainPhys
|
|||
PhysicsScene.PE.RemoveObjectFromWorld(PhysicsScene.World, m_terrainBody);
|
||||
// Frees both the body and the shape.
|
||||
PhysicsScene.PE.DestroyObject(PhysicsScene.World, m_terrainBody);
|
||||
m_terrainBody.Clear();
|
||||
m_terrainShape.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue