stop the Vehicle AFTER fixing position not before, bc stop code also updates position (old ode)

LSLKeyTest
UbitUmarov 2015-11-20 19:40:04 +00:00
parent 395d160c41
commit 019d057563
1 changed files with 5 additions and 6 deletions

View File

@ -2676,18 +2676,17 @@ Console.WriteLine(" JointCreateFixed");
m_lastVelocity = _velocity;
if(m_vehicle != null && m_vehicle.Type != Vehicle.TYPE_NONE)
m_vehicle.Stop();
if (Body != IntPtr.Zero)
{
d.BodySetLinearVel(Body, 0, 0, 0); // stop it
d.BodySetPosition(Body, _position.X, _position.Y, _position.Z);
enableBodySoft();
}
if(m_vehicle != null && m_vehicle.Type != Vehicle.TYPE_NONE)
m_vehicle.Stop(); // this also updates vehicle last position from the body position
enableBodySoft();
outofBounds = false;
base.RequestPhysicsterseUpdate();