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.
user_profiles
Robert Adams 2013-01-24 14:26:11 -08:00
parent 3ecfddd791
commit 2cf29c87bc
1 changed files with 7 additions and 1 deletions

View File

@ -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