diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 8905c18fe0..c54f8f84e7 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -1425,6 +1425,16 @@ if (m_shape != null) { PhysActor.delink(); } + if (!UsePhysics) + { + // reset velocity to 0 on physics switch-off. Without that, the client thinks the + // prim still has velocity and continues to interpolate its position along the old + // velocity-vector. + Velocity = new Vector3(0, 0, 0); + Acceleration = new Vector3(0, 0, 0); + AngularVelocity = new Vector3(0, 0, 0); + } + PhysActor.IsPhysical = UsePhysics; @@ -1450,13 +1460,6 @@ if (m_shape != null) { } } } - - if (!UsePhysics) - { - // reset velocity to 0. Without that, the client thinks the prim still has velocity and - // continues to interpolate its position along the old velocity-vector. - Velocity = new Vector3(0, 0, 0); - } } m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); }