aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs13
1 files changed, 7 insertions, 6 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 378199c..edce960 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -1659,7 +1659,7 @@ namespace OpenSim.Region.Environment.Scenes
1659 Ray NewRay = new Ray(AXOrigin, AXdirection); 1659 Ray NewRay = new Ray(AXOrigin, AXdirection);
1660 1660
1661 // Ray Trace against target here 1661 // Ray Trace against target here
1662 EntityIntersection ei = target.TestIntersectionOBB(NewRay, new Quaternion(1, 0, 0, 0), frontFacesOnly, CopyCenters); 1662 EntityIntersection ei = target.TestIntersectionOBB(NewRay, new Quaternion(1, 0, 0, 0), frontFacesOnly, false);
1663 1663
1664 // Un-comment out the following line to Get Raytrace results printed to the console. 1664 // Un-comment out the following line to Get Raytrace results printed to the console.
1665 // m_log.Info("[RAYTRACERESULTS]: Hit:" + ei.HitTF.ToString() + " Point: " + ei.ipoint.ToString() + " Normal: " + ei.normal.ToString()); 1665 // m_log.Info("[RAYTRACERESULTS]: Hit:" + ei.HitTF.ToString() + " Point: " + ei.ipoint.ToString() + " Normal: " + ei.normal.ToString());
@@ -1676,16 +1676,17 @@ namespace OpenSim.Region.Environment.Scenes
1676 ScaleOffset = Math.Abs(ScaleOffset); 1676 ScaleOffset = Math.Abs(ScaleOffset);
1677 LLVector3 intersectionpoint = new LLVector3(ei.ipoint.x, ei.ipoint.y, ei.ipoint.z); 1677 LLVector3 intersectionpoint = new LLVector3(ei.ipoint.x, ei.ipoint.y, ei.ipoint.z);
1678 LLVector3 normal = new LLVector3(ei.normal.x, ei.normal.y, ei.normal.z); 1678 LLVector3 normal = new LLVector3(ei.normal.x, ei.normal.y, ei.normal.z);
1679 1679 LLVector3 offset = (normal * (ScaleOffset / 2f));
1680 pos = (intersectionpoint + offset);
1680 1681
1681 if (CopyCenters) 1682 if (CopyCenters)
1682 { 1683 {
1683 // now we cast a ray from inside the prim(absolute position) to one of it's faces along the face normal. 1684 // now we cast a ray from inside the prim(absolute position) to one of it's faces along the face normal.
1684 LLVector3 direction2 = LLVector3.Norm(intersectionpoint - target2.AbsolutePosition); 1685 LLVector3 direction2 = LLVector3.Norm(pos - target2.AbsolutePosition);
1685 Vector3 AXOrigin2 = new Vector3(target2.AbsolutePosition.X, target2.AbsolutePosition.Y, target2.AbsolutePosition.Z); 1686 Vector3 AXOrigin2 = new Vector3(target2.AbsolutePosition.X, target2.AbsolutePosition.Y, target2.AbsolutePosition.Z);
1686 Vector3 AXdirection2 = ei.AAfaceNormal; 1687 Vector3 AXdirection2 = new Vector3(direction2.X, direction2.Y, direction2.Z); //ei.AAfaceNormal;
1687 Ray NewRay2 = new Ray(AXOrigin2, AXdirection2); 1688 Ray NewRay2 = new Ray(AXOrigin2, AXdirection2);
1688 EntityIntersection ei2 = target.TestIntersectionOBB(NewRay2, new Quaternion(1, 0, 0, 0), true, CopyCenters); 1689 EntityIntersection ei2 = target.TestIntersectionOBB(NewRay2, new Quaternion(1, 0, 0, 0), false, CopyCenters);
1689 if (ei2.HitTF) 1690 if (ei2.HitTF)
1690 { 1691 {
1691 //m_log.Info("[RAYTRACERESULTS]: Hit:" + ei2.HitTF.ToString() + " Point: " + ei2.ipoint.ToString() + " Normal: " + ei2.normal.ToString()); 1692 //m_log.Info("[RAYTRACERESULTS]: Hit:" + ei2.HitTF.ToString() + " Point: " + ei2.ipoint.ToString() + " Normal: " + ei2.normal.ToString());
@@ -1697,7 +1698,7 @@ namespace OpenSim.Region.Environment.Scenes
1697 } 1698 }
1698 1699
1699 // Set the position to the intersection point 1700 // Set the position to the intersection point
1700 LLVector3 offset = (normal * (ScaleOffset / 2f)); 1701 offset = (normal * (ScaleOffset / 2f));
1701 pos = (intersectionpoint + offset); 1702 pos = (intersectionpoint + offset);
1702 1703
1703 // stick in offset format from the original prim 1704 // stick in offset format from the original prim