diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs | 8 |
1 files changed, 8 insertions, 0 deletions
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 | |||
653 | { | 653 | { |
654 | // Since this force is being applied in only one step, make this a force per second. | 654 | // Since this force is being applied in only one step, make this a force per second. |
655 | OMV.Vector3 addForce = force / PhysScene.LastTimeStep; | 655 | OMV.Vector3 addForce = force / PhysScene.LastTimeStep; |
656 | |||
657 | // compensate for density variation | ||
658 | // with a adicional parameter to sync with old ode | ||
659 | if(pushforce) | ||
660 | addForce = addForce * Density * BSParam.DensityScaleFactor * 0.08f;; | ||
661 | |||
656 | AddForce(addForce, pushforce, false); | 662 | AddForce(addForce, pushforce, false); |
657 | } | 663 | } |
664 | |||
658 | public override void AddForce(OMV.Vector3 force, bool pushforce, bool inTaintTime) { | 665 | public override void AddForce(OMV.Vector3 force, bool pushforce, bool inTaintTime) { |
659 | if (force.IsFinite()) | 666 | if (force.IsFinite()) |
660 | { | 667 | { |
@@ -668,6 +675,7 @@ public sealed class BSCharacter : BSPhysObject | |||
668 | if (PhysBody.HasPhysicalBody) | 675 | if (PhysBody.HasPhysicalBody) |
669 | { | 676 | { |
670 | PhysScene.PE.ApplyCentralForce(PhysBody, addForce); | 677 | PhysScene.PE.ApplyCentralForce(PhysBody, addForce); |
678 | PhysScene.PE.Activate(PhysBody, true); | ||
671 | } | 679 | } |
672 | }); | 680 | }); |
673 | } | 681 | } |