diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs index fcc1224..15a40fe 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs | |||
@@ -623,7 +623,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin | |||
623 | { | 623 | { |
624 | if (!IsActive) return; | 624 | if (!IsActive) return; |
625 | 625 | ||
626 | // zap values so they will be fetched when needed | 626 | // Zap values so they will be fetched if needed |
627 | m_knownTerrainHeight = m_knownWaterLevel = float.MinValue; | 627 | m_knownTerrainHeight = m_knownWaterLevel = float.MinValue; |
628 | 628 | ||
629 | MoveLinear(pTimestep); | 629 | MoveLinear(pTimestep); |
@@ -634,8 +634,8 @@ namespace OpenSim.Region.Physics.BulletSPlugin | |||
634 | // remember the position so next step we can limit absolute movement effects | 634 | // remember the position so next step we can limit absolute movement effects |
635 | m_lastPositionVector = Prim.ForcePosition; | 635 | m_lastPositionVector = Prim.ForcePosition; |
636 | 636 | ||
637 | // Force the physics engine to decide whether values have updated. | 637 | // Force the physics engine to decide whether values were updated. |
638 | // TODO: this is only necessary if pos, velocity, ... were updated. Is it quicker | 638 | // TODO: this is only necessary if pos, velocity, etc were updated. Is it quicker |
639 | // to check for changes here or just push the update? | 639 | // to check for changes here or just push the update? |
640 | BulletSimAPI.PushUpdate2(Prim.PhysBody.ptr); | 640 | BulletSimAPI.PushUpdate2(Prim.PhysBody.ptr); |
641 | 641 | ||
@@ -643,13 +643,13 @@ namespace OpenSim.Region.Physics.BulletSPlugin | |||
643 | Prim.LocalID, Prim.ForcePosition, Prim.Force, Prim.ForceVelocity, Prim.RotationalVelocity); | 643 | Prim.LocalID, Prim.ForcePosition, Prim.Force, Prim.ForceVelocity, Prim.RotationalVelocity); |
644 | } | 644 | } |
645 | 645 | ||
646 | // Apply the effect of the linear motor. | 646 | // Apply the effect of the linear motor and other linear motions (like hover and float). |
647 | // Also does hover and float. | ||
648 | private void MoveLinear(float pTimestep) | 647 | private void MoveLinear(float pTimestep) |
649 | { | 648 | { |
650 | Vector3 linearMotorContribution = m_linearMotor.Step(pTimestep); | 649 | Vector3 linearMotorContribution = m_linearMotor.Step(pTimestep); |
651 | 650 | ||
652 | // Rotate new object velocity from vehicle relative to world coordinates | 651 | // The movement computed in the linear motor is relative to the vehicle |
652 | // coordinates. Rotate the movement to world coordinates. | ||
653 | linearMotorContribution *= Prim.ForceOrientation; | 653 | linearMotorContribution *= Prim.ForceOrientation; |
654 | 654 | ||
655 | // ================================================================== | 655 | // ================================================================== |