diff options
author | Mark Palange (Mani) <palange@lindenlab.com> | 2009-11-09 13:16:18 -0800 |
---|---|---|
committer | Mark Palange (Mani) <palange@lindenlab.com> | 2009-11-09 13:16:18 -0800 |
commit | b34b82f7fea702b7cb4309195314c45fd3d2e630 (patch) | |
tree | 8af0d2b7f2670902d9b3d7cf878081ffd7aacab7 /indra/newview/llviewermediafocus.cpp | |
parent | 06ba4927aa8d288b843ed1380132c14938708707 (diff) | |
parent | dc5db676efd340bccd2c6f376c0bcba77e0507c4 (diff) |
Automated merge with ssh://hg.lindenlab.com/brad/brad-parabuild
Diffstat (limited to 'indra/newview/llviewermediafocus.cpp')
-rw-r--r-- | indra/newview/llviewermediafocus.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/indra/newview/llviewermediafocus.cpp b/indra/newview/llviewermediafocus.cpp index b2a0fa4b1c..70a7d835a3 100644 --- a/indra/newview/llviewermediafocus.cpp +++ b/indra/newview/llviewermediafocus.cpp @@ -499,8 +499,14 @@ void LLViewerMediaFocus::focusZoomOnMedia(LLUUID media_id) S32 face = obj->getFaceIndexWithMediaImpl(impl, -1); // We don't have a proper pick normal here, and finding a face's real normal is... complicated. - // For now, use +z to look at the top of the object. - LLVector3 normal(0.0f, 0.0f, 1.0f); + LLVector3 normal = obj->getApproximateFaceNormal(face); + if(normal.isNull()) + { + // If that didn't work, use the inverse of the camera "look at" axis, which should keep the camera pointed in the same direction. +// llinfos << "approximate face normal invalid, using camera direction." << llendl; + normal = LLViewerCamera::getInstance()->getAtAxis(); + normal *= (F32)-1.0f; + } // Attempt to focus/zoom on that face. setFocusFace(obj, face, impl, normal); |