aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs
diff options
context:
space:
mode:
authorRobert Adams2016-10-03 20:47:30 -0700
committerRobert Adams2016-10-03 20:47:30 -0700
commite13fecfd3d465cd51f4d0802b3f2a4d9b2c989b7 (patch)
tree262ade32cd391ca2e3a7ebe87a48771b85ab52a5 /OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs
parentminor cleanup (diff)
downloadopensim-SC-e13fecfd3d465cd51f4d0802b3f2a4d9b2c989b7.zip
opensim-SC-e13fecfd3d465cd51f4d0802b3f2a4d9b2c989b7.tar.gz
opensim-SC-e13fecfd3d465cd51f4d0802b3f2a4d9b2c989b7.tar.bz2
opensim-SC-e13fecfd3d465cd51f4d0802b3f2a4d9b2c989b7.tar.xz
BulletSim: zero velocity target when setting velocity through the
SetMomentum method.
Diffstat (limited to 'OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs')
-rw-r--r--OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs12
1 files changed, 11 insertions, 1 deletions
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs b/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs
index 213f2eb..757f06c 100644
--- a/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs
+++ b/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs
@@ -350,7 +350,6 @@ public sealed class BSCharacter : BSPhysObject
350 } 350 }
351 } 351 }
352 352
353
354 // Check that the current position is sane and, if not, modify the position to make it so. 353 // Check that the current position is sane and, if not, modify the position to make it so.
355 // Check for being below terrain or on water. 354 // Check for being below terrain or on water.
356 // Returns 'true' of the position was made sane by some action. 355 // Returns 'true' of the position was made sane by some action.
@@ -502,6 +501,17 @@ public sealed class BSCharacter : BSPhysObject
502 } 501 }
503 } 502 }
504 503
504 // SetMomentum just sets the velocity without a target. We need to stop the movement actor if a character.
505 public override void SetMomentum(OMV.Vector3 momentum)
506 {
507 if (m_moveActor != null)
508 {
509 m_moveActor.SetVelocityAndTarget(OMV.Vector3.Zero, OMV.Vector3.Zero, false /* inTaintTime */);
510 }
511 base.SetMomentum(momentum);
512 }
513
514
505 public override OMV.Vector3 Torque { 515 public override OMV.Vector3 Torque {
506 get { return RawTorque; } 516 get { return RawTorque; }
507 set { RawTorque = value; 517 set { RawTorque = value;