diff options
author | UbitUmarov | 2015-12-12 20:52:12 +0000 |
---|---|---|
committer | UbitUmarov | 2015-12-12 20:52:12 +0000 |
commit | 79945cff7c5578f864a044e038f6a32c9ac92f0a (patch) | |
tree | 66917d9895bc4b36775bfaf7f7e761c5ba612e80 /OpenSim/Region/PhysicsModules/BulletS | |
parent | invalidate LandPoint on land subdivide (diff) | |
download | opensim-SC_OLD-79945cff7c5578f864a044e038f6a32c9ac92f0a.zip opensim-SC_OLD-79945cff7c5578f864a044e038f6a32c9ac92f0a.tar.gz opensim-SC_OLD-79945cff7c5578f864a044e038f6a32c9ac92f0a.tar.bz2 opensim-SC_OLD-79945cff7c5578f864a044e038f6a32c9ac92f0a.tar.xz |
improve a bit llpushobject on avatars using bullet, but force is ignored a few seconds after a movement comand. RAdams plz take a look
Diffstat (limited to 'OpenSim/Region/PhysicsModules/BulletS')
-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 | } |