aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs')
-rw-r--r--OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs16
1 files changed, 10 insertions, 6 deletions
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs b/OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs
index 1d552eb..fd9b834 100644
--- a/OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs
+++ b/OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs
@@ -394,7 +394,7 @@ public class BSPrim : BSPhysObject
394 // Apply upforce and overcome gravity. 394 // Apply upforce and overcome gravity.
395 OMV.Vector3 correctionForce = upForce - PhysScene.DefaultGravity; 395 OMV.Vector3 correctionForce = upForce - PhysScene.DefaultGravity;
396 DetailLog("{0},BSPrim.PositionSanityCheck,applyForce,pos={1},upForce={2},correctionForce={3}", LocalID, RawPosition, upForce, correctionForce); 396 DetailLog("{0},BSPrim.PositionSanityCheck,applyForce,pos={1},upForce={2},correctionForce={3}", LocalID, RawPosition, upForce, correctionForce);
397 AddForce(correctionForce, false, inTaintTime); 397 AddForce(inTaintTime, correctionForce);
398 ret = true; 398 ret = true;
399 } 399 }
400 } 400 }
@@ -1249,14 +1249,18 @@ public class BSPrim : BSPhysObject
1249 // Per documentation, max force is limited. 1249 // Per documentation, max force is limited.
1250 OMV.Vector3 addForce = Util.ClampV(force, BSParam.MaxAddForceMagnitude); 1250 OMV.Vector3 addForce = Util.ClampV(force, BSParam.MaxAddForceMagnitude);
1251 1251
1252 // Since this force is being applied in only one step, make this a force per second. 1252 // Push forces seem to be scaled differently (follow pattern in ubODE)
1253 addForce /= PhysScene.LastTimeStep; 1253 if (!pushforce) {
1254 AddForce(addForce, pushforce, false /* inTaintTime */); 1254 // Since this force is being applied in only one step, make this a force per second.
1255 addForce /= PhysScene.LastTimeStep;
1256 }
1257
1258 AddForce(false /* inTaintTime */, addForce);
1255 } 1259 }
1256 1260
1257 // Applying a force just adds this to the total force on the object. 1261 // Applying a force just adds this to the total force on the object.
1258 // This added force will only last the next simulation tick. 1262 // This added force will only last the next simulation tick.
1259 public override void AddForce(OMV.Vector3 force, bool pushforce, bool inTaintTime) { 1263 public override void AddForce(bool inTaintTime, OMV.Vector3 force) {
1260 // for an object, doesn't matter if force is a pushforce or not 1264 // for an object, doesn't matter if force is a pushforce or not
1261 if (IsPhysicallyActive) 1265 if (IsPhysicallyActive)
1262 { 1266 {
@@ -1315,7 +1319,7 @@ public class BSPrim : BSPhysObject
1315 } 1319 }
1316 1320
1317 // BSPhysObject.AddAngularForce() 1321 // BSPhysObject.AddAngularForce()
1318 public override void AddAngularForce(OMV.Vector3 force, bool pushforce, bool inTaintTime) 1322 public override void AddAngularForce(bool inTaintTime, OMV.Vector3 force)
1319 { 1323 {
1320 if (force.IsFinite()) 1324 if (force.IsFinite())
1321 { 1325 {