From 9a424059446fadb80c2700ece273905ebe5a2b5a Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Sat, 24 Nov 2012 20:11:38 -0800 Subject: BulletSim: small change to add position correction force with AddForce rather than just storing it in the variable --- OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs') diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs index 2b3fa25..caa6c46 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs @@ -342,13 +342,12 @@ public sealed class BSPrim : BSPhysObject // TODO: check for out of bounds // The above code computes a force to apply to correct any out-of-bounds problems. Apply same. + // TODO: This should be intergrated with a geneal physics action mechanism. + // TODO: This should be moderated with PID'ness. if (ret) { - PhysicsScene.TaintedObject(inTaintTime, "BSPrim.PositionSanityCheck:belowTerrain", delegate() - { - // Apply upforce and overcome gravity. - ForceVelocity = ForceVelocity + upForce - PhysicsScene.DefaultGravity; - }); + // Apply upforce and overcome gravity. + AddForce(upForce - PhysicsScene.DefaultGravity, false, inTaintTime); } return ret; } -- cgit v1.1