aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorteravus2013-03-16 11:09:49 -0400
committerteravus2013-03-16 11:09:49 -0400
commit455da9dd20dc6a992c7adc1a8fd851ab586392a1 (patch)
tree83a6f65e0bdbe823d365b9e4765b1b78eb7d3c76 /OpenSim
parentMerge branch 'avination' of ssh://3dhosting.de/var/git/careminster into avina... (diff)
downloadopensim-SC_OLD-455da9dd20dc6a992c7adc1a8fd851ab586392a1.zip
opensim-SC_OLD-455da9dd20dc6a992c7adc1a8fd851ab586392a1.tar.gz
opensim-SC_OLD-455da9dd20dc6a992c7adc1a8fd851ab586392a1.tar.bz2
opensim-SC_OLD-455da9dd20dc6a992c7adc1a8fd851ab586392a1.tar.xz
* Ignores VolumeDetect enabled prim in the camera raycast call. Note: The SceneRaycast call doesn't have a filter option in the interface and physics will use the lower level one for all sorts of goodies so it wouldn't be appropriate to ignore it at the physics layer yet.. though that would be better once the API has filters.
Diffstat (limited to 'OpenSim')
-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 91f9c0b..230cb23 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1526,17 +1526,42 @@ namespace OpenSim.Region.Framework.Scenes
1526 m_doingCamRayCast = false; 1526 m_doingCamRayCast = false;
1527 if (hitYN && localid != LocalId) 1527 if (hitYN && localid != LocalId)
1528 { 1528 {
1529 CameraConstraintActive = true; 1529 SceneObjectGroup group = m_scene.GetGroupByPrim(localid);
1530 pNormal.X = (float)Math.Round(pNormal.X, 2); 1530 bool IsPrim = group != null;
1531 pNormal.Y = (float)Math.Round(pNormal.Y, 2); 1531 if (IsPrim)
1532 pNormal.Z = (float)Math.Round(pNormal.Z, 2); 1532 {
1533 pNormal.Normalize(); 1533 SceneObjectPart part = group.GetPart(localid);
1534 collisionPoint.X = (float)Math.Round(collisionPoint.X, 1); 1534 if (part != null && !part.VolumeDetectActive)
1535 collisionPoint.Y = (float)Math.Round(collisionPoint.Y, 1); 1535 {
1536 collisionPoint.Z = (float)Math.Round(collisionPoint.Z, 1); 1536 CameraConstraintActive = true;
1537 1537 pNormal.X = (float) Math.Round(pNormal.X, 2);
1538 Vector4 plane = new Vector4(pNormal.X, pNormal.Y, pNormal.Z, Vector3.Dot(collisionPoint, pNormal)); 1538 pNormal.Y = (float) Math.Round(pNormal.Y, 2);
1539 UpdateCameraCollisionPlane(plane); 1539 pNormal.Z = (float) Math.Round(pNormal.Z, 2);
1540 pNormal.Normalize();
1541 collisionPoint.X = (float) Math.Round(collisionPoint.X, 1);
1542 collisionPoint.Y = (float) Math.Round(collisionPoint.Y, 1);
1543 collisionPoint.Z = (float) Math.Round(collisionPoint.Z, 1);
1544
1545 Vector4 plane = new Vector4(pNormal.X, pNormal.Y, pNormal.Z,
1546 Vector3.Dot(collisionPoint, pNormal));
1547 UpdateCameraCollisionPlane(plane);
1548 }
1549 }
1550 else
1551 {
1552 CameraConstraintActive = true;
1553 pNormal.X = (float) Math.Round(pNormal.X, 2);
1554 pNormal.Y = (float) Math.Round(pNormal.Y, 2);
1555 pNormal.Z = (float) Math.Round(pNormal.Z, 2);
1556 pNormal.Normalize();
1557 collisionPoint.X = (float) Math.Round(collisionPoint.X, 1);
1558 collisionPoint.Y = (float) Math.Round(collisionPoint.Y, 1);
1559 collisionPoint.Z = (float) Math.Round(collisionPoint.Z, 1);
1560
1561 Vector4 plane = new Vector4(pNormal.X, pNormal.Y, pNormal.Z,
1562 Vector3.Dot(collisionPoint, pNormal));
1563 UpdateCameraCollisionPlane(plane);
1564 }
1540 } 1565 }
1541 else if (!m_pos.ApproxEquals(m_lastPosition, POSITION_TOLERANCE) || 1566 else if (!m_pos.ApproxEquals(m_lastPosition, POSITION_TOLERANCE) ||
1542 !Rotation.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE)) 1567 !Rotation.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE))