aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs19
1 files changed, 10 insertions, 9 deletions
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs
index f94e70b..af7ca1d 100644
--- a/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs
+++ b/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs
@@ -928,7 +928,7 @@ namespace OpenSim.Region.Physics.OdePlugin
928 IsColliding = true; 928 IsColliding = true;
929 } 929 }
930 } 930 }
931 931/*
932 if (contact.normal.Z < 0.2f) 932 if (contact.normal.Z < 0.2f)
933 { 933 {
934 contact.normal.Z = 0; 934 contact.normal.Z = 0;
@@ -940,6 +940,7 @@ namespace OpenSim.Region.Physics.OdePlugin
940 contact.normal.Y *= t; 940 contact.normal.Y *= t;
941 } 941 }
942 } 942 }
943 */
943 return true; 944 return true;
944 } 945 }
945 946
@@ -1203,8 +1204,8 @@ namespace OpenSim.Region.Physics.OdePlugin
1203 // Avatar to Avatar collisions 1204 // Avatar to Avatar collisions
1204 // Prim to avatar collisions 1205 // Prim to avatar collisions
1205 1206
1206 vec.X = -vel.X * PID_D * 2 + (_zeroPosition.X - localpos.X) * (PID_P * 5); 1207 vec.X = -vel.X * PID_D + (_zeroPosition.X - localpos.X) * (PID_P * 5);
1207 vec.Y = -vel.Y * PID_D * 2 + (_zeroPosition.Y - localpos.Y) * (PID_P * 5); 1208 vec.Y = -vel.Y * PID_D + (_zeroPosition.Y - localpos.Y) * (PID_P * 5);
1208 if (flying) 1209 if (flying)
1209 { 1210 {
1210 vec.Z += -vel.Z * PID_D + (_zeroPosition.Z - localpos.Z) * PID_P; 1211 vec.Z += -vel.Z * PID_D + (_zeroPosition.Z - localpos.Z) * PID_P;
@@ -1225,7 +1226,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1225 if (ctz.Z > 0f) 1226 if (ctz.Z > 0f)
1226 { 1227 {
1227 // moving up or JUMPING 1228 // moving up or JUMPING
1228 vec.Z += (ctz.Z - vel.Z) * PID_D * 1.2f;// +(_zeroPosition.Z - localpos.Z) * PID_P; 1229 vec.Z += (ctz.Z - vel.Z) * PID_D;
1229 vec.X += (ctz.X - vel.X) * (PID_D); 1230 vec.X += (ctz.X - vel.X) * (PID_D);
1230 vec.Y += (ctz.Y - vel.Y) * (PID_D); 1231 vec.Y += (ctz.Y - vel.Y) * (PID_D);
1231 } 1232 }
@@ -1235,7 +1236,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1235 if (ctz.Z == 0) 1236 if (ctz.Z == 0)
1236 { 1237 {
1237 if (vel.Z > 0) 1238 if (vel.Z > 0)
1238 vec.Z -= vel.Z * PID_D * 2.0f; 1239 vec.Z -= vel.Z * PID_D;
1239 vec.X += (ctz.X - vel.X) * (PID_D); 1240 vec.X += (ctz.X - vel.X) * (PID_D);
1240 vec.Y += (ctz.Y - vel.Y) * (PID_D); 1241 vec.Y += (ctz.Y - vel.Y) * (PID_D);
1241 } 1242 }
@@ -1243,7 +1244,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1243 else 1244 else
1244 { 1245 {
1245 if (ctz.Z < vel.Z) 1246 if (ctz.Z < vel.Z)
1246 vec.Z += (ctz.Z - vel.Z) * PID_D * 2.0f; 1247 vec.Z += (ctz.Z - vel.Z) * PID_D;
1247 else 1248 else
1248 { 1249 {
1249 } 1250 }
@@ -1262,7 +1263,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1262 // We're flying and colliding with something 1263 // We're flying and colliding with something
1263 vec.X += (ctz.X - vel.X) * (PID_D * 0.0625f); 1264 vec.X += (ctz.X - vel.X) * (PID_D * 0.0625f);
1264 vec.Y += (ctz.Y - vel.Y) * (PID_D * 0.0625f); 1265 vec.Y += (ctz.Y - vel.Y) * (PID_D * 0.0625f);
1265 vec.Z += (ctz.Z - vel.Z) * (PID_D); 1266 vec.Z += (ctz.Z - vel.Z) * (PID_D * 0.0625f);
1266 } 1267 }
1267 } 1268 }
1268 else // ie not colliding 1269 else // ie not colliding
@@ -1270,8 +1271,8 @@ namespace OpenSim.Region.Physics.OdePlugin
1270 if (flying) //(!m_iscolliding && flying) 1271 if (flying) //(!m_iscolliding && flying)
1271 { 1272 {
1272 // we're in mid air suspended 1273 // we're in mid air suspended
1273 vec.X += (ctz.X - vel.X) * (PID_D * 1.667f); 1274 vec.X += (ctz.X - vel.X) * (PID_D);
1274 vec.Y += (ctz.Y - vel.Y) * (PID_D * 1.667f); 1275 vec.Y += (ctz.Y - vel.Y) * (PID_D);
1275 vec.Z += (ctz.Z - vel.Z) * (PID_D); 1276 vec.Z += (ctz.Z - vel.Z) * (PID_D);
1276 } 1277 }
1277 1278