aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorUbitUmarov2012-04-20 03:17:36 +0100
committerUbitUmarov2012-04-20 03:17:36 +0100
commitec6347f987cc1e42761ff9bd4832da4f999401f0 (patch)
tree7f46bb085b72dc2b84b7fe97fb7370f372b7a3b6 /OpenSim/Region
parent changed - VolumeDetect and phantom setting interaction. Script VD(true) forc... (diff)
downloadopensim-SC_OLD-ec6347f987cc1e42761ff9bd4832da4f999401f0.zip
opensim-SC_OLD-ec6347f987cc1e42761ff9bd4832da4f999401f0.tar.gz
opensim-SC_OLD-ec6347f987cc1e42761ff9bd4832da4f999401f0.tar.bz2
opensim-SC_OLD-ec6347f987cc1e42761ff9bd4832da4f999401f0.tar.xz
ubitODE - again avatar/terrain collision. Reduce new viewers interpolators efects reporting null velocity and aceleration when stopped near the right position, where they can still have instantanius large values that can get magnified by interpolators, specially using diferent timing estimation.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs20
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