change object drag so it applies a impulse and not a push force so it works as before my fix to impulse/forces

avinationmerge
UbitUmarov 2012-06-11 22:43:35 +01:00
parent 0e045ea3d5
commit cd49949478
1 changed files with 6 additions and 2 deletions

View File

@ -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);
}
}