aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorUbitUmarov2013-01-08 02:29:21 +0000
committerUbitUmarov2013-01-08 02:29:21 +0000
commit126e73c5ed7bb95b36739d46921375b78f6207e1 (patch)
treedf1999994e970216d49c524b63f60d0cb1e01bd8 /OpenSim/Region/Framework
parent reduce sampling of camera raycasts to previus value (diff)
downloadopensim-SC-126e73c5ed7bb95b36739d46921375b78f6207e1.zip
opensim-SC-126e73c5ed7bb95b36739d46921375b78f6207e1.tar.gz
opensim-SC-126e73c5ed7bb95b36739d46921375b78f6207e1.tar.bz2
opensim-SC-126e73c5ed7bb95b36739d46921375b78f6207e1.tar.xz
put back position and rot change check before sending releasing plane constrain
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs11
1 files changed, 7 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index a19f029..cdba282 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1421,6 +1421,9 @@ namespace OpenSim.Region.Framework.Scenes
1421 1421
1422 public void RayCastCameraCallback(bool hitYN, Vector3 collisionPoint, uint localid, float distance, Vector3 pNormal) 1422 public void RayCastCameraCallback(bool hitYN, Vector3 collisionPoint, uint localid, float distance, Vector3 pNormal)
1423 { 1423 {
1424 const float POSITION_TOLERANCE = 0.02f;
1425 const float ROTATION_TOLERANCE = 0.02f;
1426
1424 m_doingCamRayCast = false; 1427 m_doingCamRayCast = false;
1425 if (hitYN && localid != LocalId) 1428 if (hitYN && localid != LocalId)
1426 { 1429 {
@@ -1436,11 +1439,11 @@ namespace OpenSim.Region.Framework.Scenes
1436 Vector4 plane = new Vector4(pNormal.X, pNormal.Y, pNormal.Z, Vector3.Dot(collisionPoint, pNormal)); 1439 Vector4 plane = new Vector4(pNormal.X, pNormal.Y, pNormal.Z, Vector3.Dot(collisionPoint, pNormal));
1437 UpdateCameraCollisionPlane(plane); 1440 UpdateCameraCollisionPlane(plane);
1438 } 1441 }
1439 else 1442 else if (!m_pos.ApproxEquals(m_lastPosition, POSITION_TOLERANCE) ||
1443 !Rotation.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE))
1440 { 1444 {
1441 Vector4 plane = new Vector4(0.9f, 0.0f, 0.361f, -9000f); // not right... 1445 Vector4 plane = new Vector4(0.9f, 0.0f, 0.361f, -9000f); // not right...
1442 UpdateCameraCollisionPlane(plane); 1446 UpdateCameraCollisionPlane(plane);
1443
1444 CameraConstraintActive = false; 1447 CameraConstraintActive = false;
1445 } 1448 }
1446 } 1449 }
@@ -1543,8 +1546,8 @@ namespace OpenSim.Region.Framework.Scenes
1543 if (!m_doingCamRayCast && !m_mouseLook && ParentID == 0) 1546 if (!m_doingCamRayCast && !m_mouseLook && ParentID == 0)
1544 { 1547 {
1545 Vector3 posAdjusted = AbsolutePosition; 1548 Vector3 posAdjusted = AbsolutePosition;
1546 posAdjusted.Z += 0.5f * Appearance.AvatarSize.Z - 0.5f; 1549// posAdjusted.Z += 0.5f * Appearance.AvatarSize.Z - 0.5f;
1547 1550 posAdjusted.Z += 1.0f; // viewer current camera focus point
1548 Vector3 tocam = CameraPosition - posAdjusted; 1551 Vector3 tocam = CameraPosition - posAdjusted;
1549 tocam.X = (float)Math.Round(tocam.X, 1); 1552 tocam.X = (float)Math.Round(tocam.X, 1);
1550 tocam.Y = (float)Math.Round(tocam.Y, 1); 1553 tocam.Y = (float)Math.Round(tocam.Y, 1);