diff options
author | Melanie | 2012-03-20 20:48:55 +0000 |
---|---|---|
committer | Melanie | 2012-03-20 20:48:55 +0000 |
commit | fdd4d787a431bf3becdb8584be748308fe113115 (patch) | |
tree | ccbeef34352f4c8985cf663dd13756a14fb8fff3 /OpenSim/Region/Physics/OdePlugin | |
parent | Merge branch 'ubitwork' (diff) | |
parent | reduce avatar verticle jump from the absurd 5 meter jump to a less (diff) | |
download | opensim-SC_OLD-fdd4d787a431bf3becdb8584be748308fe113115.zip opensim-SC_OLD-fdd4d787a431bf3becdb8584be748308fe113115.tar.gz opensim-SC_OLD-fdd4d787a431bf3becdb8584be748308fe113115.tar.bz2 opensim-SC_OLD-fdd4d787a431bf3becdb8584be748308fe113115.tar.xz |
Merge branch 'master' into careminster
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin')
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/ODECharacter.cs | 21 | ||||
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/OdeScene.cs | 13 |
2 files changed, 23 insertions, 11 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs index 6d1f41d..8397eb4 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs | |||
@@ -115,6 +115,11 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
115 | private float m_tainted_CAPSULE_LENGTH; // set when the capsule length changes. | 115 | private float m_tainted_CAPSULE_LENGTH; // set when the capsule length changes. |
116 | 116 | ||
117 | /// <summary> | 117 | /// <summary> |
118 | /// Base movement for calculating tilt. | ||
119 | /// </summary> | ||
120 | private float m_tiltBaseMovement = (float)Math.Sqrt(2); | ||
121 | |||
122 | /// <summary> | ||
118 | /// Used to introduce a fixed tilt because a straight-up capsule falls through terrain, probably a bug in terrain collider | 123 | /// Used to introduce a fixed tilt because a straight-up capsule falls through terrain, probably a bug in terrain collider |
119 | /// </summary> | 124 | /// </summary> |
120 | private float m_tiltMagnitudeWhenProjectedOnXYPlane = 0.1131371f; | 125 | private float m_tiltMagnitudeWhenProjectedOnXYPlane = 0.1131371f; |
@@ -524,14 +529,14 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
524 | if (movementVector.Y > 0) | 529 | if (movementVector.Y > 0) |
525 | { | 530 | { |
526 | // northeast | 531 | // northeast |
527 | movementVector.X = (float)Math.Sqrt(2.0); | 532 | movementVector.X = m_tiltBaseMovement; |
528 | movementVector.Y = (float)Math.Sqrt(2.0); | 533 | movementVector.Y = m_tiltBaseMovement; |
529 | } | 534 | } |
530 | else | 535 | else |
531 | { | 536 | { |
532 | // southeast | 537 | // southeast |
533 | movementVector.X = (float)Math.Sqrt(2.0); | 538 | movementVector.X = m_tiltBaseMovement; |
534 | movementVector.Y = -(float)Math.Sqrt(2.0); | 539 | movementVector.Y = -m_tiltBaseMovement; |
535 | } | 540 | } |
536 | } | 541 | } |
537 | else | 542 | else |
@@ -540,14 +545,14 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
540 | if (movementVector.Y > 0) | 545 | if (movementVector.Y > 0) |
541 | { | 546 | { |
542 | // northwest | 547 | // northwest |
543 | movementVector.X = -(float)Math.Sqrt(2.0); | 548 | movementVector.X = -m_tiltBaseMovement; |
544 | movementVector.Y = (float)Math.Sqrt(2.0); | 549 | movementVector.Y = m_tiltBaseMovement; |
545 | } | 550 | } |
546 | else | 551 | else |
547 | { | 552 | { |
548 | // southwest | 553 | // southwest |
549 | movementVector.X = -(float)Math.Sqrt(2.0); | 554 | movementVector.X = -m_tiltBaseMovement; |
550 | movementVector.Y = -(float)Math.Sqrt(2.0); | 555 | movementVector.Y = -m_tiltBaseMovement; |
551 | } | 556 | } |
552 | } | 557 | } |
553 | 558 | ||
diff --git a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs index 598530c..842ff91 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs | |||
@@ -181,8 +181,15 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
181 | private float avPIDP = 1400f; | 181 | private float avPIDP = 1400f; |
182 | private float avCapRadius = 0.37f; | 182 | private float avCapRadius = 0.37f; |
183 | private float avStandupTensor = 2000000f; | 183 | private float avStandupTensor = 2000000f; |
184 | private bool avCapsuleTilted = true; // true = old compatibility mode with leaning capsule; false = new corrected mode | 184 | |
185 | public bool IsAvCapsuleTilted { get { return avCapsuleTilted; } set { avCapsuleTilted = value; } } | 185 | /// <summary> |
186 | /// true = old compatibility mode with leaning capsule; false = new corrected mode | ||
187 | /// </summary> | ||
188 | /// <remarks> | ||
189 | /// Even when set to false, the capsule still tilts but this is done in a different way. | ||
190 | /// </remarks> | ||
191 | public bool IsAvCapsuleTilted { get; private set; } | ||
192 | |||
186 | private float avDensity = 80f; | 193 | private float avDensity = 80f; |
187 | // private float avHeightFudgeFactor = 0.52f; | 194 | // private float avHeightFudgeFactor = 0.52f; |
188 | private float avMovementDivisorWalk = 1.3f; | 195 | private float avMovementDivisorWalk = 1.3f; |
@@ -501,7 +508,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
501 | avMovementDivisorWalk = physicsconfig.GetFloat("av_movement_divisor_walk", 1.3f); | 508 | avMovementDivisorWalk = physicsconfig.GetFloat("av_movement_divisor_walk", 1.3f); |
502 | avMovementDivisorRun = physicsconfig.GetFloat("av_movement_divisor_run", 0.8f); | 509 | avMovementDivisorRun = physicsconfig.GetFloat("av_movement_divisor_run", 0.8f); |
503 | avCapRadius = physicsconfig.GetFloat("av_capsule_radius", 0.37f); | 510 | avCapRadius = physicsconfig.GetFloat("av_capsule_radius", 0.37f); |
504 | avCapsuleTilted = physicsconfig.GetBoolean("av_capsule_tilted", false); | 511 | IsAvCapsuleTilted = physicsconfig.GetBoolean("av_capsule_tilted", false); |
505 | 512 | ||
506 | contactsPerCollision = physicsconfig.GetInt("contacts_per_collision", 80); | 513 | contactsPerCollision = physicsconfig.GetInt("contacts_per_collision", 80); |
507 | 514 | ||