aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
diff options
context:
space:
mode:
authorRobert Adams2012-11-29 22:21:45 -0800
committerRobert Adams2012-11-29 22:21:45 -0800
commitec63e4ff29f9983b65d76232018156605762ccc0 (patch)
treeb7bbe2b1fe10f05421ebb72c3f3302329bcde6ad /OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
parentBulletSim: add copyright header where it is missing. Remove some unnecessary ... (diff)
downloadopensim-SC_OLD-ec63e4ff29f9983b65d76232018156605762ccc0.zip
opensim-SC_OLD-ec63e4ff29f9983b65d76232018156605762ccc0.tar.gz
opensim-SC_OLD-ec63e4ff29f9983b65d76232018156605762ccc0.tar.bz2
opensim-SC_OLD-ec63e4ff29f9983b65d76232018156605762ccc0.tar.xz
BulletSim: remove time scaling of computed vehicle absolute velocity since Bullet will scale the movement by the time slice. Restore LIMIT_MOTOR_UP to definitition of BOAT simce some vehicle engines use it even for land vehicles. Push vehicle parameter updates through the regular property update to solve vehicles floating off when they should be stopped.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs15
1 files changed, 4 insertions, 11 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
index 3fb0300..54b4167 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
@@ -348,7 +348,9 @@ public sealed class BSPrim : BSPhysObject
348 if (ret) 348 if (ret)
349 { 349 {
350 // Apply upforce and overcome gravity. 350 // Apply upforce and overcome gravity.
351 AddForce(upForce - PhysicsScene.DefaultGravity, false, inTaintTime); 351 OMV.Vector3 correctionForce = upForce - PhysicsScene.DefaultGravity;
352 DetailLog("{0},BSPrim.PositionSanityCheck,applyForce,pos={1},upForce={2},correctionForce={3}", LocalID, _position, upForce, correctionForce);
353 AddForce(correctionForce, false, inTaintTime);
352 } 354 }
353 return ret; 355 return ret;
354 } 356 }
@@ -839,15 +841,6 @@ public sealed class BSPrim : BSPhysObject
839 } 841 }
840 public override OMV.Vector3 RotationalVelocity { 842 public override OMV.Vector3 RotationalVelocity {
841 get { 843 get {
842 /*
843 OMV.Vector3 pv = OMV.Vector3.Zero;
844 // if close to zero, report zero
845 // This is copied from ODE but I'm not sure why it returns zero but doesn't
846 // zero the property in the physics engine.
847 if (_rotationalVelocity.ApproxEquals(pv, 0.2f))
848 return pv;
849 */
850
851 return _rotationalVelocity; 844 return _rotationalVelocity;
852 } 845 }
853 set { 846 set {
@@ -1409,7 +1402,7 @@ public sealed class BSPrim : BSPhysObject
1409 LastEntityProperties = CurrentEntityProperties; 1402 LastEntityProperties = CurrentEntityProperties;
1410 CurrentEntityProperties = entprop; 1403 CurrentEntityProperties = entprop;
1411 1404
1412 OMV.Vector3 direction = OMV.Vector3.UnitX * _orientation; 1405 OMV.Vector3 direction = OMV.Vector3.UnitX * _orientation; // DEBUG DEBUG DEBUG
1413 DetailLog("{0},BSPrim.UpdateProperties,call,pos={1},orient={2},dir={3},vel={4},rotVel={5}", 1406 DetailLog("{0},BSPrim.UpdateProperties,call,pos={1},orient={2},dir={3},vel={4},rotVel={5}",
1414 LocalID, _position, _orientation, direction, _velocity, _rotationalVelocity); 1407 LocalID, _position, _orientation, direction, _velocity, _rotationalVelocity);
1415 1408