aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorteravus2013-05-14 19:17:31 -0400
committerteravus2013-05-14 19:17:31 -0400
commit799ba5aa7b2b5d82e5e2f622929042b38da3809c (patch)
tree58a5fb8bef27281cf5c5e6d57eb00db28da57f4b /OpenSim
parentExplicitly zero avatar velocity on sit (diff)
downloadopensim-SC_OLD-799ba5aa7b2b5d82e5e2f622929042b38da3809c.zip
opensim-SC_OLD-799ba5aa7b2b5d82e5e2f622929042b38da3809c.tar.gz
opensim-SC_OLD-799ba5aa7b2b5d82e5e2f622929042b38da3809c.tar.bz2
opensim-SC_OLD-799ba5aa7b2b5d82e5e2f622929042b38da3809c.tar.xz
* Tweaks the hard cut to apply to collisions of Greater then Normal Z 0.95. This fits within Ubit's framework of multi-body collisions, just moves the reactive force to the Midboxgeom(actual detection) instead of the bigbox geom(pre detection)
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs28
1 files changed, 27 insertions, 1 deletions
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs
index bea34d4..238e6e9 100644
--- a/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs
+++ b/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs
@@ -1045,12 +1045,37 @@ namespace OpenSim.Region.Physics.OdePlugin
1045 if (me == midbox) 1045 if (me == midbox)
1046 { 1046 {
1047 if (Math.Abs(contact.normal.Z) > 0.95f) 1047 if (Math.Abs(contact.normal.Z) > 0.95f)
1048 {
1048 offset.Z = contact.pos.Z - _position.Z; 1049 offset.Z = contact.pos.Z - _position.Z;
1050 offset.X = (float)Math.Abs(offset.X) * 0.5f + contact.depth;
1051 offset.Y = (float)Math.Abs(offset.Y) * 0.5f + contact.depth;
1052 offset.Z = (float)Math.Abs(offset.Z) * 0.5f + contact.depth;
1053
1054 if (reverse)
1055 {
1056 offset.X *= -contact.normal.X;
1057 offset.Y *= -contact.normal.Y;
1058 offset.Z *= -contact.normal.Z;
1059 }
1060 else
1061 {
1062 offset.X *= contact.normal.X;
1063 offset.Y *= contact.normal.Y;
1064 offset.Z *= contact.normal.Z;
1065 }
1066
1067 offset.X += contact.pos.X;
1068 offset.Y += contact.pos.Y;
1069 offset.Z += contact.pos.Z;
1070 _position = offset;
1071 return true;
1072 }
1049 else 1073 else
1050 offset.Z = contact.normal.Z; 1074 offset.Z = contact.normal.Z;
1051 1075
1052 offset.Normalize(); 1076 offset.Normalize();
1053 1077
1078 /*
1054 if (reverse) 1079 if (reverse)
1055 { 1080 {
1056 contact.normal.X = offset.X; 1081 contact.normal.X = offset.X;
@@ -1063,7 +1088,8 @@ namespace OpenSim.Region.Physics.OdePlugin
1063 contact.normal.Y = -offset.Y; 1088 contact.normal.Y = -offset.Y;
1064 contact.normal.Z = -offset.Z; 1089 contact.normal.Z = -offset.Z;
1065 } 1090 }
1066 1091 */
1092 //_position.Z = offset.Z;
1067 return true; 1093 return true;
1068 } 1094 }
1069 1095