[osg-users] camera attached to a node

Philip Hahn everphilski at gmail.com
Fri Oct 12 13:14:38 PDT 2007


good afternoon-

 I was looking at the NPS tutorials and it was mentioned in tutorial
11.1that a osgGA::TrackerManipulator can be used to attach a camera to
a node.

 I tried this, (by attaching the TrackerManipulator to the node in question,
then manually setting my view matrix using the TrackerManipulator's
getMatrix() ) and while the camera follows the path of my node through space
as it moves (it is scripted), I don't see my node. I did set a minimum
following distance.

 Could someone either point me to a tutorial or give me a quick overview of
how to a TrackerManipulator? Ultimately I'm trying to make a camera I can
orbit around a moving vehicle, keeping focus on the vehicle (I presume some
if not all of this functionality exists, I'm just not seeing it ... ) .
Right now I'm manually calculating it using spherical coordinates,
retrieving the position of my target node, and using makeLookAt() to
generate a matrix.

 Thanks,

Philip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20071012/423a4891/attachment-0002.htm>


More information about the osg-users mailing list