Hi Jimmy,

Good to hear you've got it working.  One thing to watch is whether
your callback is getting the current or previous frames view matrix.
The viewer camera view matrix is updated in the update traversal, so
if you want to be 100% sure of getting the correct view matrix then
placing the update between the call to viewer.updateTraversal() and
viewer.renderingTraversals() will do the trick.

Robert.

On Tue, Aug 18, 2009 at 2:30 AM, Jimmy Lin<dummy...@gmail.com> wrote:
> Hi,
>
> I think I got it now.
>
> I combine both hud and callback approach.
>
> I created a slave camera similar to the one in the example, then add a update 
> callback to it.
> In the callback I update the view matrix of the slave camera relate to the 
> master camera's view matrix. so the views are basically the same between the 
> slave and master camera, but for slave camera it was translated so it always 
> look at my 3D axis object's center (which is (0, 0, 0) in my case to make it 
> simple).
>
> It seems work fine now, but I would happy to know if there are other ways to 
> do this.
>
>
> Thank you!
>
> Cheers,
> Jimmy
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=16363#16363
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to