From c51ef38e2d867d63d2d32b1a7d284033e60d9952 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Tue, 31 Jul 2012 16:22:50 -0700 Subject: BulletSim: fix problem where resizing a primary shape (cube or sphere) would not rebuild the physics mesh. Update the DLLs and SOs to latest version. --- OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs | 2 +- OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/Physics') diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs b/OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs index 07f5a21..ea3093a 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs @@ -86,7 +86,7 @@ public class BSConstraint : IDisposable public bool SetCFMAndERP(float cfm, float erp) { - bool ret = false; + bool ret = true; BulletSimAPI.SetConstraintParam2(m_constraint.Ptr, ConstraintParams.BT_CONSTRAINT_STOP_CFM, cfm, ConstraintParamAxis.AXIS_ALL); BulletSimAPI.SetConstraintParam2(m_constraint.Ptr, ConstraintParams.BT_CONSTRAINT_STOP_ERP, erp, ConstraintParamAxis.AXIS_ALL); BulletSimAPI.SetConstraintParam2(m_constraint.Ptr, ConstraintParams.BT_CONSTRAINT_CFM, cfm, ConstraintParamAxis.AXIS_ALL); diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs index 758acdc..a4ab702 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs @@ -973,7 +973,7 @@ public sealed class BSPrim : PhysicsActor if (_size.X == _size.Y && _size.Y == _size.Z && _size.X == _size.Z) { // m_log.DebugFormat("{0}: CreateGeom: Defaulting to sphere of size {1}", LogHeader, _size); - if (_shapeType != ShapeData.PhysicsShapeType.SHAPE_SPHERE) + if (forceRebuild || (_shapeType != ShapeData.PhysicsShapeType.SHAPE_SPHERE)) { DetailLog("{0},CreateGeom,sphere", LocalID); _shapeType = ShapeData.PhysicsShapeType.SHAPE_SPHERE; @@ -987,7 +987,7 @@ public sealed class BSPrim : PhysicsActor else { // m_log.DebugFormat("{0}: CreateGeom: Defaulting to box. lid={1}, type={2}, size={3}", LogHeader, LocalID, _shapeType, _size); - if (_shapeType != ShapeData.PhysicsShapeType.SHAPE_BOX) + if (forceRebuild || (_shapeType != ShapeData.PhysicsShapeType.SHAPE_BOX)) { DetailLog("{0},CreateGeom,box", LocalID); _shapeType = ShapeData.PhysicsShapeType.SHAPE_BOX; @@ -1331,7 +1331,6 @@ public sealed class BSPrim : PhysicsActor base.RequestPhysicsterseUpdate(); } - /* else { // For debugging, we can also report the movement of children @@ -1339,7 +1338,6 @@ public sealed class BSPrim : PhysicsActor LocalID, entprop.Position, entprop.Rotation, entprop.Velocity, entprop.Acceleration, entprop.RotationalVelocity); } - */ } // I've collided with something -- cgit v1.1