diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs index ec4be58..f4aa231 100644 --- a/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs +++ b/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs | |||
@@ -862,12 +862,12 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
862 | float depth = terrainheight - chrminZ; | 862 | float depth = terrainheight - chrminZ; |
863 | if (!flying) | 863 | if (!flying) |
864 | { | 864 | { |
865 | vec.Z = -vel.Z * PID_D * 1.5f + depth * PID_P * 60; | 865 | vec.Z = -vel.Z * PID_D * 1.5f + depth * PID_P * 50; |
866 | } | 866 | } |
867 | else | 867 | else |
868 | vec.Z = depth * PID_P * 60; | 868 | vec.Z = depth * PID_P * 50; |
869 | 869 | ||
870 | if (depth < 0.2f) | 870 | if (depth < 0.1f) |
871 | { | 871 | { |
872 | m_iscolliding = true; | 872 | m_iscolliding = true; |
873 | m_colliderfilter = 2; | 873 | m_colliderfilter = 2; |
@@ -1009,9 +1009,17 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1009 | 1009 | ||
1010 | // update our local ideia of position velocity and aceleration | 1010 | // update our local ideia of position velocity and aceleration |
1011 | _position = localpos; | 1011 | _position = localpos; |
1012 | _acceleration = _velocity; // previus velocity | 1012 | if (_zeroFlag) |
1013 | _velocity = vel; | 1013 | { |
1014 | _acceleration = (vel - _acceleration) / timeStep; | 1014 | _velocity = Vector3.Zero; |
1015 | _acceleration = Vector3.Zero; | ||
1016 | } | ||
1017 | else | ||
1018 | { | ||
1019 | _acceleration = _velocity; // previus velocity | ||
1020 | _velocity = vel; | ||
1021 | _acceleration = (vel - _acceleration) / timeStep; | ||
1022 | } | ||
1015 | 1023 | ||
1016 | } | 1024 | } |
1017 | 1025 | ||