aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs19
1 files changed, 17 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs b/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
index 809435d..794857c 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
@@ -226,8 +226,23 @@ public sealed class BSShapeCollection : IDisposable
226 // made. Native shapes work in either case. 226 // made. Native shapes work in either case.
227 if (prim.IsPhysical && BSParam.ShouldUseHullsForPhysicalObjects) 227 if (prim.IsPhysical && BSParam.ShouldUseHullsForPhysicalObjects)
228 { 228 {
229 // Update prim.BSShape to reference a hull of this shape. 229 // Use a simple, single mesh convex hull shape if the object is simple enough
230 BSShape potentialHull = BSShapeHull.GetReference(m_physicsScene, false /*forceRebuild*/, prim); 230 BSShape potentialHull = null;
231
232 PrimitiveBaseShape pbs = prim.BaseShape;
233 if (BSParam.ShouldUseSingleConvexHullForPrims
234 && pbs != null
235 && !pbs.SculptEntry
236 && PrimHasNoCuts(pbs)
237 )
238 {
239 potentialHull = BSShapeConvexHull.GetReference(m_physicsScene, false /* forceRebuild */, prim);
240 }
241 else
242 {
243 potentialHull = BSShapeHull.GetReference(m_physicsScene, false /*forceRebuild*/, prim);
244 }
245
231 // If the current shape is not what is on the prim at the moment, time to change. 246 // If the current shape is not what is on the prim at the moment, time to change.
232 if (!prim.PhysShape.HasPhysicalShape 247 if (!prim.PhysShape.HasPhysicalShape
233 || potentialHull.ShapeType != prim.PhysShape.ShapeType 248 || potentialHull.ShapeType != prim.PhysShape.ShapeType