aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs24
1 files changed, 9 insertions, 15 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
index 6c8ae2e..3be28e3 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
@@ -1295,10 +1295,9 @@ public sealed class BSPrim : PhysicsActor
1295 // relative to each other. 1295 // relative to each other.
1296 void CreateLinkset() 1296 void CreateLinkset()
1297 { 1297 {
1298 DebugLog("{0}: CreateLinkset. Root prim={1}, prims={2}", LogHeader, LocalID, _childrenPrims.Count+1); 1298 // DebugLog("{0}: CreateLinkset. Root prim={1}, prims={2}", LogHeader, LocalID, _childrenPrims.Count+1);
1299 1299
1300 // remove any constraints that might be in place 1300 // remove any constraints that might be in place
1301 DebugLog("{0}: CreateLinkset: RemoveConstraints between me and any children", LogHeader, LocalID);
1302 UnlinkAllChildren(); 1301 UnlinkAllChildren();
1303 1302
1304 // create constraints between the root prim and each of the children 1303 // create constraints between the root prim and each of the children
@@ -1324,18 +1323,8 @@ public sealed class BSPrim : PhysicsActor
1324 1323
1325 // create a constraint that allows no freedom of movement between the two objects 1324 // create a constraint that allows no freedom of movement between the two objects
1326 // http://bulletphysics.org/Bullet/phpBB3/viewtopic.php?t=4818 1325 // http://bulletphysics.org/Bullet/phpBB3/viewtopic.php?t=4818
1327 DebugLog("{0}: CreateLinkset: Adding a constraint between root prim {1} and child prim {2}", LogHeader, LocalID, childPrim.LocalID); 1326 // DebugLog("{0}: CreateLinkset: Adding a constraint between root prim {1} and child prim {2}", LogHeader, LocalID, childPrim.LocalID);
1328 DetailLog("{0},LinkAChildToMe,taint,root={1},child={2}", LocalID, LocalID, childPrim.LocalID); 1327 DetailLog("{0},LinkAChildToMe,taint,root={1},child={2}", LocalID, LocalID, childPrim.LocalID);
1329 /*
1330 BulletSimAPI.AddConstraint(_scene.WorldID, LocalID, childPrim.LocalID,
1331 childRelativePosition,
1332 childRelativeRotation,
1333 OMV.Vector3.Zero,
1334 OMV.Quaternion.Identity,
1335 OMV.Vector3.Zero, OMV.Vector3.Zero,
1336 OMV.Vector3.Zero, OMV.Vector3.Zero);
1337 */
1338 // BSConstraint constrain = new BSConstraint(_scene.World, this.Body, childPrim.Body,
1339 BSConstraint constrain = _scene.Constraints.CreateConstraint( 1328 BSConstraint constrain = _scene.Constraints.CreateConstraint(
1340 _scene.World, this.Body, childPrim.Body, 1329 _scene.World, this.Body, childPrim.Body,
1341 childRelativePosition, 1330 childRelativePosition,
@@ -1346,8 +1335,13 @@ public sealed class BSPrim : PhysicsActor
1346 constrain.SetAngularLimits(OMV.Vector3.Zero, OMV.Vector3.Zero); 1335 constrain.SetAngularLimits(OMV.Vector3.Zero, OMV.Vector3.Zero);
1347 1336
1348 // tweek the constraint to increase stability 1337 // tweek the constraint to increase stability
1349 constrain.UseFrameOffset(true); 1338 constrain.UseFrameOffset(_scene.BoolNumeric(_scene.Params.linkConstraintUseFrameOffset));
1350 constrain.TranslationalLimitMotor(true, 5f, 0.1f); 1339 if (_scene.BoolNumeric(_scene.Params.linkConstraintEnableTransMotor))
1340 {
1341 constrain.TranslationalLimitMotor(true,
1342 _scene.Params.linkConstraintTransMotorMaxVel,
1343 _scene.Params.linkConstraintTransMotorMaxForce);
1344 }
1351 } 1345 }
1352 1346
1353 // Remove linkage between myself and a particular child 1347 // Remove linkage between myself and a particular child