aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs21
1 files changed, 12 insertions, 9 deletions
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs
index 992fae7..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,12 +940,15 @@ 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
946 altContact = contact; 947 altContact = contact;
947 useAltcontact = true; 948 useAltcontact = true;
948 949
950 offset.Z -= 0.2f;
951
949 offset.Normalize(); 952 offset.Normalize();
950 953
951 if (contact.depth > 0.1f) 954 if (contact.depth > 0.1f)
@@ -1201,8 +1204,8 @@ namespace OpenSim.Region.Physics.OdePlugin
1201 // Avatar to Avatar collisions 1204 // Avatar to Avatar collisions
1202 // Prim to avatar collisions 1205 // Prim to avatar collisions
1203 1206
1204 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);
1205 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);
1206 if (flying) 1209 if (flying)
1207 { 1210 {
1208 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;
@@ -1223,7 +1226,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1223 if (ctz.Z > 0f) 1226 if (ctz.Z > 0f)
1224 { 1227 {
1225 // moving up or JUMPING 1228 // moving up or JUMPING
1226 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;
1227 vec.X += (ctz.X - vel.X) * (PID_D); 1230 vec.X += (ctz.X - vel.X) * (PID_D);
1228 vec.Y += (ctz.Y - vel.Y) * (PID_D); 1231 vec.Y += (ctz.Y - vel.Y) * (PID_D);
1229 } 1232 }
@@ -1233,7 +1236,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1233 if (ctz.Z == 0) 1236 if (ctz.Z == 0)
1234 { 1237 {
1235 if (vel.Z > 0) 1238 if (vel.Z > 0)
1236 vec.Z -= vel.Z * PID_D * 2.0f; 1239 vec.Z -= vel.Z * PID_D;
1237 vec.X += (ctz.X - vel.X) * (PID_D); 1240 vec.X += (ctz.X - vel.X) * (PID_D);
1238 vec.Y += (ctz.Y - vel.Y) * (PID_D); 1241 vec.Y += (ctz.Y - vel.Y) * (PID_D);
1239 } 1242 }
@@ -1241,7 +1244,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1241 else 1244 else
1242 { 1245 {
1243 if (ctz.Z < vel.Z) 1246 if (ctz.Z < vel.Z)
1244 vec.Z += (ctz.Z - vel.Z) * PID_D * 2.0f; 1247 vec.Z += (ctz.Z - vel.Z) * PID_D;
1245 else 1248 else
1246 { 1249 {
1247 } 1250 }
@@ -1260,7 +1263,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1260 // We're flying and colliding with something 1263 // We're flying and colliding with something
1261 vec.X += (ctz.X - vel.X) * (PID_D * 0.0625f); 1264 vec.X += (ctz.X - vel.X) * (PID_D * 0.0625f);
1262 vec.Y += (ctz.Y - vel.Y) * (PID_D * 0.0625f); 1265 vec.Y += (ctz.Y - vel.Y) * (PID_D * 0.0625f);
1263 vec.Z += (ctz.Z - vel.Z) * (PID_D); 1266 vec.Z += (ctz.Z - vel.Z) * (PID_D * 0.0625f);
1264 } 1267 }
1265 } 1268 }
1266 else // ie not colliding 1269 else // ie not colliding
@@ -1268,8 +1271,8 @@ namespace OpenSim.Region.Physics.OdePlugin
1268 if (flying) //(!m_iscolliding && flying) 1271 if (flying) //(!m_iscolliding && flying)
1269 { 1272 {
1270 // we're in mid air suspended 1273 // we're in mid air suspended
1271 vec.X += (ctz.X - vel.X) * (PID_D * 1.667f); 1274 vec.X += (ctz.X - vel.X) * (PID_D);
1272 vec.Y += (ctz.Y - vel.Y) * (PID_D * 1.667f); 1275 vec.Y += (ctz.Y - vel.Y) * (PID_D);
1273 vec.Z += (ctz.Z - vel.Z) * (PID_D); 1276 vec.Z += (ctz.Z - vel.Z) * (PID_D);
1274 } 1277 }
1275 1278