diff options
author | Robert Adams | 2013-01-24 14:26:11 -0800 |
---|---|---|
committer | Robert Adams | 2013-01-24 14:35:23 -0800 |
commit | 2cf29c87bccb5b359fc74e1a0520bfd394d86d15 (patch) | |
tree | d0b7c07b2b9dbb39f8d74ff4bfce44934024f6bd /OpenSim/Region/Physics/BulletSPlugin | |
parent | BulletSim: remove exception that can happen when setting physics parameters f... (diff) | |
download | opensim-SC-2cf29c87bccb5b359fc74e1a0520bfd394d86d15.zip opensim-SC-2cf29c87bccb5b359fc74e1a0520bfd394d86d15.tar.gz opensim-SC-2cf29c87bccb5b359fc74e1a0520bfd394d86d15.tar.bz2 opensim-SC-2cf29c87bccb5b359fc74e1a0520bfd394d86d15.tar.xz |
BulletSim: zero motion on an object that we pop up because it is
below terrain. If the position is being corrected because it is out
of bounds, all other movement rules are out the window.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin')
-rw-r--r-- | OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs index f80084a..8b00a33 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs | |||
@@ -363,7 +363,11 @@ public sealed class BSPrim : BSPhysObject | |||
363 | // not get it through the terrain | 363 | // not get it through the terrain |
364 | _position.Z = targetHeight; | 364 | _position.Z = targetHeight; |
365 | if (inTaintTime) | 365 | if (inTaintTime) |
366 | { | ||
366 | ForcePosition = _position; | 367 | ForcePosition = _position; |
368 | } | ||
369 | // If we are throwing the object around, zero its other forces | ||
370 | ZeroMotion(inTaintTime); | ||
367 | ret = true; | 371 | ret = true; |
368 | } | 372 | } |
369 | 373 | ||
@@ -1639,10 +1643,12 @@ public sealed class BSPrim : BSPhysObject | |||
1639 | // DetailLog("{0},BSPrim.UpdateProperties,afterAssign,entprop={1}", LocalID, entprop); // DEBUG DEBUG | 1643 | // DetailLog("{0},BSPrim.UpdateProperties,afterAssign,entprop={1}", LocalID, entprop); // DEBUG DEBUG |
1640 | 1644 | ||
1641 | // The sanity check can change the velocity and/or position. | 1645 | // The sanity check can change the velocity and/or position. |
1642 | if (IsPhysical && PositionSanityCheck(true)) | 1646 | if (IsPhysical && PositionSanityCheck(true /* inTaintTime */ )) |
1643 | { | 1647 | { |
1644 | entprop.Position = _position; | 1648 | entprop.Position = _position; |
1645 | entprop.Velocity = _velocity; | 1649 | entprop.Velocity = _velocity; |
1650 | entprop.RotationalVelocity = _rotationalVelocity; | ||
1651 | entprop.Acceleration = _acceleration; | ||
1646 | } | 1652 | } |
1647 | 1653 | ||
1648 | OMV.Vector3 direction = OMV.Vector3.UnitX * _orientation; // DEBUG DEBUG DEBUG | 1654 | OMV.Vector3 direction = OMV.Vector3.UnitX * _orientation; // DEBUG DEBUG DEBUG |