aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics')
-rw-r--r--OpenSim/Region/Physics/UbitOdePlugin/ODESitAvatar.cs21
-rw-r--r--OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs6
2 files changed, 14 insertions, 13 deletions
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODESitAvatar.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODESitAvatar.cs
index ecc732a..e9023c3 100644
--- a/OpenSim/Region/Physics/UbitOdePlugin/ODESitAvatar.cs
+++ b/OpenSim/Region/Physics/UbitOdePlugin/ODESitAvatar.cs
@@ -78,8 +78,12 @@ namespace OpenSim.Region.Physics.OdePlugin
78 78
79 IntPtr geom = ((OdePrim)actor).prim_geom; 79 IntPtr geom = ((OdePrim)actor).prim_geom;
80 80
81 Vector3 geopos = d.GeomGetPositionOMV(geom); 81// Vector3 geopos = d.GeomGetPositionOMV(geom);
82 Quaternion geomOri = d.GeomGetQuaternionOMV(geom); 82// Quaternion geomOri = d.GeomGetQuaternionOMV(geom);
83
84 Vector3 geopos = actor.Position;
85 Quaternion geomOri = actor.Orientation;
86
83 Quaternion geomInvOri = Quaternion.Conjugate(geomOri); 87 Quaternion geomInvOri = Quaternion.Conjugate(geomOri);
84 88
85 Quaternion ori = Quaternion.Identity; 89 Quaternion ori = Quaternion.Identity;
@@ -116,6 +120,7 @@ namespace OpenSim.Region.Physics.OdePlugin
116 } 120 }
117 121
118 int status = 1; 122 int status = 1;
123
119 offset = rayResults[0].Pos - geopos; 124 offset = rayResults[0].Pos - geopos;
120 125
121 d.GeomClassID geoclass = d.GeomGetClass(geom); 126 d.GeomClassID geoclass = d.GeomGetClass(geom);
@@ -191,13 +196,12 @@ namespace OpenSim.Region.Physics.OdePlugin
191 if (norm.Z < 0.5f) 196 if (norm.Z < 0.5f)
192 { 197 {
193 float rayDist = 4.0f; 198 float rayDist = 4.0f;
194 float curEdgeDist = 0.0f;
195 199
196 for (int i = 0; i < 6; i++) 200 for (int i = 0; i < 6; i++)
197 { 201 {
198 pivot.X -= 0.005f * norm.X; 202 pivot.X -= 0.01f * norm.X;
199 pivot.Y -= 0.005f * norm.Y; 203 pivot.Y -= 0.01f * norm.Y;
200 pivot.Z -= 0.005f * norm.Z; 204 pivot.Z -= 0.01f * norm.Z;
201 205
202 rayDir.X = -norm.X * norm.Z; 206 rayDir.X = -norm.X * norm.Z;
203 rayDir.Y = -norm.Y * norm.Z; 207 rayDir.Y = -norm.Y * norm.Z;
@@ -208,8 +212,6 @@ namespace OpenSim.Region.Physics.OdePlugin
208 if (rayResults.Count == 0) 212 if (rayResults.Count == 0)
209 break; 213 break;
210 214
211 curEdgeDist += rayResults[0].Depth;
212
213 if (Math.Abs(rayResults[0].Normal.Z) < 0.7f) 215 if (Math.Abs(rayResults[0].Normal.Z) < 0.7f)
214 { 216 {
215 rayDist -= rayResults[0].Depth; 217 rayDist -= rayResults[0].Depth;
@@ -226,7 +228,6 @@ namespace OpenSim.Region.Physics.OdePlugin
226 else 228 else
227 { 229 {
228 foundEdge = true; 230 foundEdge = true;
229 edgeDist = curEdgeDist;
230 edgePos = rayResults[0].Pos; 231 edgePos = rayResults[0].Pos;
231 break; 232 break;
232 } 233 }
@@ -254,7 +255,7 @@ namespace OpenSim.Region.Physics.OdePlugin
254 255
255 for (int i = 0; i < 3; i++) 256 for (int i = 0; i < 3; i++)
256 { 257 {
257 pivot.Z -= 0.005f; 258 pivot.Z -= 0.01f;
258 rayDir.X = toCamX; 259 rayDir.X = toCamX;
259 rayDir.Y = toCamY; 260 rayDir.Y = toCamY;
260 rayDir.Z = (-toCamX * norm.X - toCamY * norm.Y) / norm.Z; 261 rayDir.Z = (-toCamX * norm.X - toCamY * norm.Y) / norm.Z;
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs b/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs
index d045b59..0d18adb 100644
--- a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs
+++ b/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs
@@ -2586,7 +2586,7 @@ namespace OpenSim.Region.Physics.OdePlugin
2586 req.Normal = direction; 2586 req.Normal = direction;
2587 req.Origin = position; 2587 req.Origin = position;
2588 req.Count = 0; 2588 req.Count = 0;
2589 req.filter = RayFilterFlags.All; 2589 req.filter = RayFilterFlags.AllPrims;
2590 2590
2591 m_rayCastManager.QueueRequest(req); 2591 m_rayCastManager.QueueRequest(req);
2592 } 2592 }
@@ -2603,7 +2603,7 @@ namespace OpenSim.Region.Physics.OdePlugin
2603 req.Normal = direction; 2603 req.Normal = direction;
2604 req.Origin = position; 2604 req.Origin = position;
2605 req.Count = Count; 2605 req.Count = Count;
2606 req.filter = RayFilterFlags.All; 2606 req.filter = RayFilterFlags.AllPrims;
2607 2607
2608 m_rayCastManager.QueueRequest(req); 2608 m_rayCastManager.QueueRequest(req);
2609 } 2609 }
@@ -2631,7 +2631,7 @@ namespace OpenSim.Region.Physics.OdePlugin
2631 req.Normal = direction; 2631 req.Normal = direction;
2632 req.Origin = position; 2632 req.Origin = position;
2633 req.Count = Count; 2633 req.Count = Count;
2634 req.filter = RayFilterFlags.All; 2634 req.filter = RayFilterFlags.AllPrims;
2635 2635
2636 lock (SyncObject) 2636 lock (SyncObject)
2637 { 2637 {