From 79945cff7c5578f864a044e038f6a32c9ac92f0a Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 12 Dec 2015 20:52:12 +0000 Subject: improve a bit llpushobject on avatars using bullet, but force is ignored a few seconds after a movement comand. RAdams plz take a look --- OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'OpenSim/Region/PhysicsModules') diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs b/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs index 989b339..bd3c7ac 100644 --- a/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs @@ -653,8 +653,15 @@ public sealed class BSCharacter : BSPhysObject { // Since this force is being applied in only one step, make this a force per second. OMV.Vector3 addForce = force / PhysScene.LastTimeStep; + + // compensate for density variation + // with a adicional parameter to sync with old ode + if(pushforce) + addForce = addForce * Density * BSParam.DensityScaleFactor * 0.08f;; + AddForce(addForce, pushforce, false); } + public override void AddForce(OMV.Vector3 force, bool pushforce, bool inTaintTime) { if (force.IsFinite()) { @@ -668,6 +675,7 @@ public sealed class BSCharacter : BSPhysObject if (PhysBody.HasPhysicalBody) { PhysScene.PE.ApplyCentralForce(PhysBody, addForce); + PhysScene.PE.Activate(PhysBody, true); } }); } -- cgit v1.1