aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs42
1 files changed, 23 insertions, 19 deletions
diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs b/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs
index b0f3f52..6016530 100644
--- a/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs
+++ b/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs
@@ -899,10 +899,11 @@ namespace OpenSim.Region.PhysicsModule.ubOde
899 y = tx * sin + y * cos; 899 y = tx * sin + y * cos;
900 } 900 }
901 901
902 public bool Collide(IntPtr me, IntPtr other, bool reverse, ref d.ContactGeom contact, 902 public bool Collide(IntPtr me, IntPtr other, bool reverse, ref d.ContactGeom contact,
903 ref bool feetcollision) 903 ref d.ContactGeom altContact , ref bool useAltcontact, ref bool feetcollision)
904 { 904 {
905 feetcollision = false; 905 feetcollision = false;
906 useAltcontact = false;
906 907
907 if (me == capsule) 908 if (me == capsule)
908 { 909 {
@@ -962,6 +963,18 @@ namespace OpenSim.Region.PhysicsModule.ubOde
962 if(m_flying) 963 if(m_flying)
963 return true; 964 return true;
964 965
966 feetcollision = true;
967 if (h < boneOff)
968 {
969 m_collideNormal.X = contact.normal.X;
970 m_collideNormal.Y = contact.normal.Y;
971 m_collideNormal.Z = contact.normal.Z;
972 IsColliding = true;
973 }
974
975 altContact = contact;
976 useAltcontact = true;
977
965 offset.Z -= 0.2f; 978 offset.Z -= 0.2f;
966 979
967 offset.Normalize(); 980 offset.Normalize();
@@ -980,28 +993,19 @@ namespace OpenSim.Region.PhysicsModule.ubOde
980 if (tdp > 0.25f) 993 if (tdp > 0.25f)
981 tdp = 0.25f; 994 tdp = 0.25f;
982 995
983 contact.depth = tdp; 996 altContact.depth = tdp;
984 997
985 if (reverse) 998 if (reverse)
986 { 999 {
987 contact.normal.X = offset.X; 1000 altContact.normal.X = offset.X;
988 contact.normal.Y = offset.Y; 1001 altContact.normal.Y = offset.Y;
989 contact.normal.Z = offset.Z; 1002 altContact.normal.Z = offset.Z;
990 } 1003 }
991 else 1004 else
992 { 1005 {
993 contact.normal.X = -offset.X; 1006 altContact.normal.X = -offset.X;
994 contact.normal.Y = -offset.Y; 1007 altContact.normal.Y = -offset.Y;
995 contact.normal.Z = -offset.Z; 1008 altContact.normal.Z = -offset.Z;
996 }
997
998 feetcollision = true;
999 if (h < boneOff)
1000 {
1001 m_collideNormal.X = contact.normal.X;
1002 m_collideNormal.Y = contact.normal.Y;
1003 m_collideNormal.Z = contact.normal.Z;
1004 IsColliding = true;
1005 } 1009 }
1006 return true; 1010 return true;
1007 } 1011 }