From 2cf29c87bccb5b359fc74e1a0520bfd394d86d15 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Thu, 24 Jan 2013 14:26:11 -0800 Subject: 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. --- OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 // not get it through the terrain _position.Z = targetHeight; if (inTaintTime) + { ForcePosition = _position; + } + // If we are throwing the object around, zero its other forces + ZeroMotion(inTaintTime); ret = true; } @@ -1639,10 +1643,12 @@ public sealed class BSPrim : BSPhysObject // DetailLog("{0},BSPrim.UpdateProperties,afterAssign,entprop={1}", LocalID, entprop); // DEBUG DEBUG // The sanity check can change the velocity and/or position. - if (IsPhysical && PositionSanityCheck(true)) + if (IsPhysical && PositionSanityCheck(true /* inTaintTime */ )) { entprop.Position = _position; entprop.Velocity = _velocity; + entprop.RotationalVelocity = _rotationalVelocity; + entprop.Acceleration = _acceleration; } OMV.Vector3 direction = OMV.Vector3.UnitX * _orientation; // DEBUG DEBUG DEBUG -- cgit v1.1