aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs47
1 files changed, 36 insertions, 11 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 3e3b3af..d041d8b 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1561,17 +1561,42 @@ namespace OpenSim.Region.Framework.Scenes
1561 m_doingCamRayCast = false; 1561 m_doingCamRayCast = false;
1562 if (hitYN && localid != LocalId) 1562 if (hitYN && localid != LocalId)
1563 { 1563 {
1564 CameraConstraintActive = true; 1564 SceneObjectGroup group = m_scene.GetGroupByPrim(localid);
1565 pNormal.X = (float)Math.Round(pNormal.X, 2); 1565 bool IsPrim = group != null;
1566 pNormal.Y = (float)Math.Round(pNormal.Y, 2); 1566 if (IsPrim)
1567 pNormal.Z = (float)Math.Round(pNormal.Z, 2); 1567 {
1568 pNormal.Normalize(); 1568 SceneObjectPart part = group.GetPart(localid);
1569 collisionPoint.X = (float)Math.Round(collisionPoint.X, 1); 1569 if (part != null && !part.VolumeDetectActive)
1570 collisionPoint.Y = (float)Math.Round(collisionPoint.Y, 1); 1570 {
1571 collisionPoint.Z = (float)Math.Round(collisionPoint.Z, 1); 1571 CameraConstraintActive = true;
1572 1572 pNormal.X = (float) Math.Round(pNormal.X, 2);
1573 Vector4 plane = new Vector4(pNormal.X, pNormal.Y, pNormal.Z, Vector3.Dot(collisionPoint, pNormal)); 1573 pNormal.Y = (float) Math.Round(pNormal.Y, 2);
1574 UpdateCameraCollisionPlane(plane); 1574 pNormal.Z = (float) Math.Round(pNormal.Z, 2);
1575 pNormal.Normalize();
1576 collisionPoint.X = (float) Math.Round(collisionPoint.X, 1);
1577 collisionPoint.Y = (float) Math.Round(collisionPoint.Y, 1);
1578 collisionPoint.Z = (float) Math.Round(collisionPoint.Z, 1);
1579
1580 Vector4 plane = new Vector4(pNormal.X, pNormal.Y, pNormal.Z,
1581 Vector3.Dot(collisionPoint, pNormal));
1582 UpdateCameraCollisionPlane(plane);
1583 }
1584 }
1585 else
1586 {
1587 CameraConstraintActive = true;
1588 pNormal.X = (float) Math.Round(pNormal.X, 2);
1589 pNormal.Y = (float) Math.Round(pNormal.Y, 2);
1590 pNormal.Z = (float) Math.Round(pNormal.Z, 2);
1591 pNormal.Normalize();
1592 collisionPoint.X = (float) Math.Round(collisionPoint.X, 1);
1593 collisionPoint.Y = (float) Math.Round(collisionPoint.Y, 1);
1594 collisionPoint.Z = (float) Math.Round(collisionPoint.Z, 1);
1595
1596 Vector4 plane = new Vector4(pNormal.X, pNormal.Y, pNormal.Z,
1597 Vector3.Dot(collisionPoint, pNormal));
1598 UpdateCameraCollisionPlane(plane);
1599 }
1575 } 1600 }
1576 else if (!m_pos.ApproxEquals(m_lastPosition, POSITION_TOLERANCE) || 1601 else if (!m_pos.ApproxEquals(m_lastPosition, POSITION_TOLERANCE) ||
1577 !Rotation.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE)) 1602 !Rotation.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE))