aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs8
1 files changed, 5 insertions, 3 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
index 04cb452..c4999f6 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
@@ -1013,8 +1013,8 @@ public sealed class BSPrim : PhysicsActor
1013 // m_log.DebugFormat("{0}: CreateGeom: calling CreateHull. lid={1}, key={2}, hulls={3}", LogHeader, _localID, _hullKey, hullCount); 1013 // m_log.DebugFormat("{0}: CreateGeom: calling CreateHull. lid={1}, key={2}, hulls={3}", LogHeader, _localID, _hullKey, hullCount);
1014 BulletSimAPI.CreateHull(_scene.WorldID, _hullKey, hullCount, convHulls); 1014 BulletSimAPI.CreateHull(_scene.WorldID, _hullKey, hullCount, convHulls);
1015 _shapeType = ShapeData.PhysicsShapeType.SHAPE_HULL; 1015 _shapeType = ShapeData.PhysicsShapeType.SHAPE_HULL;
1016 // meshes are already scaled by the meshmerizer 1016 // Let the object be scaled by Bullet (the mesh was created as a unit mesh)
1017 _scale = new OMV.Vector3(1f, 1f, 1f); 1017 _scale = _size;
1018 } 1018 }
1019 return; 1019 return;
1020 } 1020 }
@@ -1138,7 +1138,9 @@ public sealed class BSPrim : PhysicsActor
1138 if (_scene.NeedsMeshing(_pbs)) // linksets with constraints don't need a root mesh 1138 if (_scene.NeedsMeshing(_pbs)) // linksets with constraints don't need a root mesh
1139 { 1139 {
1140 // m_log.DebugFormat("{0}: RecreateGeomAndObject: creating mesh", LogHeader); 1140 // m_log.DebugFormat("{0}: RecreateGeomAndObject: creating mesh", LogHeader);
1141 _mesh = _scene.mesher.CreateMesh(_avName, _pbs, _size, _scene.MeshLOD, _isPhysical); 1141 // Make the mesh scaled to 1 and use Bullet's scaling feature to scale it in world
1142 OMV.Vector3 scaleFactor = new OMV.Vector3(1.0f, 1.0f, 1.0f);
1143 _mesh = _scene.mesher.CreateMesh(_avName, _pbs, scaleFactor, _scene.MeshLOD, _isPhysical);
1142 } 1144 }
1143 else 1145 else
1144 { 1146 {