aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
authorTeravus Ovares2008-05-01 04:58:15 +0000
committerTeravus Ovares2008-05-01 04:58:15 +0000
commitf4e22b1356637864fd06b4c6d9027f4580aabcc9 (patch)
tree30f4938d48bdd60ce911e00805bb27a5b5744c21 /OpenSim/Region/Environment/Scenes
parent* ODE Tweak. See if this helps. (diff)
downloadopensim-SC-f4e22b1356637864fd06b4c6d9027f4580aabcc9.zip
opensim-SC-f4e22b1356637864fd06b4c6d9027f4580aabcc9.tar.gz
opensim-SC-f4e22b1356637864fd06b4c6d9027f4580aabcc9.tar.bz2
opensim-SC-f4e22b1356637864fd06b4c6d9027f4580aabcc9.tar.xz
* Fix OBB raycaster to respond properly to rays cast from any direction.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 2ce6314..b5ead2a 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -1207,8 +1207,11 @@ namespace OpenSim.Region.Environment.Scenes
1207 // If we hit something 1207 // If we hit something
1208 if (ei.HitTF) 1208 if (ei.HitTF)
1209 { 1209 {
1210 LLVector3 intersectionpoint = new LLVector3(ei.ipoint.x, ei.ipoint.y, ei.ipoint.z);
1211 LLVector3 normal = new LLVector3(ei.normal.x, ei.normal.y, ei.normal.z);
1210 // Set the position to the intersection point 1212 // Set the position to the intersection point
1211 pos = (new LLVector3(ei.ipoint.x, ei.ipoint.y, ei.ipoint.z) + (new LLVector3(ei.normal.x,ei.normal.x,ei.normal.z) * (0.5f/2f))); 1213 LLVector3 offset = (normal * (0.5f / 2f));
1214 pos = (intersectionpoint + offset);
1212 1215
1213 // Un-offset the prim (it gets offset later by the consumer method) 1216 // Un-offset the prim (it gets offset later by the consumer method)
1214 pos.Z -= 0.25F; 1217 pos.Z -= 0.25F;