aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorubit2013-01-08 03:31:50 +0100
committerubit2013-01-08 03:31:50 +0100
commitfed11e26659052b273640a23fe3d40c40985e43c (patch)
treee5f46f50ccbcd6c898cef177ee332132172732f6 /OpenSim/Region
parentMerge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork (diff)
parent put back position and rot change check before sending releasing plane constrain (diff)
downloadopensim-SC-fed11e26659052b273640a23fe3d40c40985e43c.zip
opensim-SC-fed11e26659052b273640a23fe3d40c40985e43c.tar.gz
opensim-SC-fed11e26659052b273640a23fe3d40c40985e43c.tar.bz2
opensim-SC-fed11e26659052b273640a23fe3d40c40985e43c.tar.xz
Merge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork
Diffstat (limited to 'OpenSim/Region')
-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);