aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
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
parent* Remove old CAPS http listeners when a client logs out from a scene (diff)
downloadopensim-SC-e11e6dc308a01a1f76f755157e9e91027d172a52.zip
opensim-SC-e11e6dc308a01a1f76f755157e9e91027d172a52.tar.gz
opensim-SC-e11e6dc308a01a1f76f755157e9e91027d172a52.tar.bz2
opensim-SC-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 '')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs8
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs1
2 files changed, 7 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
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index acb2588..2a2c1a0 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -1260,6 +1260,7 @@ namespace OpenSim.Region.Environment.Scenes
1260 returnresult.distance = distance2; 1260 returnresult.distance = distance2;
1261 returnresult.HitTF = true; 1261 returnresult.HitTF = true;
1262 returnresult.ipoint = q; 1262 returnresult.ipoint = q;
1263 m_log.Info("[FACE]:" + i.ToString());
1263 //m_log.Info("[POINT]: " + q.ToString()); 1264 //m_log.Info("[POINT]: " + q.ToString());
1264 returnresult.normal = normals[i]; 1265 returnresult.normal = normals[i];
1265 1266