aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-03-25 17:28:09 +0000
committerTeravus Ovares2008-03-25 17:28:09 +0000
commite11e6dc308a01a1f76f755157e9e91027d172a52 (patch)
treea5c63165d614f79dc16e364b5c7c82803c901157 /OpenSim/Region/Environment/Scenes/Scene.cs
parent* Remove old CAPS http listeners when a client logs out from a scene (diff)
downloadopensim-SC_OLD-e11e6dc308a01a1f76f755157e9e91027d172a52.zip
opensim-SC_OLD-e11e6dc308a01a1f76f755157e9e91027d172a52.tar.gz
opensim-SC_OLD-e11e6dc308a01a1f76f755157e9e91027d172a52.tar.bz2
opensim-SC_OLD-e11e6dc308a01a1f76f755157e9e91027d172a52.tar.xz
* Use Face normal to offset new prim instead of the hard coded pos.Z += 0.25f; This allows proper positioning of prim based on the face you click. ( Yes, you can click the bottom face of a prim that's above you, and the new prim appears directly below it. )
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs8
1 files changed, 6 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 75f8c23..c74092a 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -1087,13 +1087,17 @@ namespace OpenSim.Region.Environment.Scenes
1087 EntityIntersection ei = target.TestIntersectionOBB(NewRay, new Quaternion(1,0,0,0)); 1087 EntityIntersection ei = target.TestIntersectionOBB(NewRay, new Quaternion(1,0,0,0));
1088 1088
1089 // Un-comment out the following line to Get Raytrace results printed to the console. 1089 // Un-comment out the following line to Get Raytrace results printed to the console.
1090 //m_log.Info("[RAYTRACERESULTS]: Hit:" + ei.HitTF.ToString() + " Point: " + ei.ipoint.ToString() + " Normal: " + ei.normal.ToString()); 1090 m_log.Info("[RAYTRACERESULTS]: Hit:" + ei.HitTF.ToString() + " Point: " + ei.ipoint.ToString() + " Normal: " + ei.normal.ToString());
1091 1091
1092 // If we hit something 1092 // If we hit something
1093 if (ei.HitTF) 1093 if (ei.HitTF)
1094 { 1094 {
1095 // Set the position to the intersection point 1095 // Set the position to the intersection point
1096 pos = new LLVector3(ei.ipoint.x, ei.ipoint.y, ei.ipoint.z); 1096 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)));
1097
1098 // Un-offset the prim (it gets offset later by the consumer method)
1099 pos.Z -= 0.25F;
1100
1097 } 1101 }
1098 1102
1099 1103