From cd4994947858516f9177501499a1139f23ddd3cf Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 11 Jun 2012 22:43:35 +0100 Subject: change object drag so it applies a impulse and not a push force so it works as before my fix to impulse/forces --- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 8fa7880..aab6a49 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -2992,10 +2992,14 @@ namespace OpenSim.Region.Framework.Scenes { if (!m_rootPart.BlockGrab) { - Vector3 llmoveforce = pos - AbsolutePosition; +/* Vector3 llmoveforce = pos - AbsolutePosition; Vector3 grabforce = llmoveforce; grabforce = (grabforce / 10) * pa.Mass; - pa.AddForce(grabforce, true); + */ + // empirically convert distance diference to a impulse + Vector3 grabforce = pos - AbsolutePosition; + grabforce = grabforce * (pa.Mass/ 10.0f); + pa.AddForce(grabforce, false); m_scene.PhysicsScene.AddPhysicsActorTaint(pa); } } -- cgit v1.1