HI all,

I am currently trying to manually attach a camera behind a node containing a 
transformed object mesh. I would like the camera to translate and rotate 
identically to my object.

I am setting the transform matrix of the node by calling 
obj_transform_matrix.makeLookAt(OBJECT ROLL VECTOR, OBJECT POSITION COORDS, 
OBJECT YAW VECTOR).

I know that the camera should be a given number of units (let's say 40 units) 
behind the object on the eye vector, so I then set my camera matrix to
camera_marix.makeLookAt(OBJECT ROLL VECTOR, OBJECT POSITION COORDS - OBJECT 
ROLL VECTOR * 40, OBJECT YAW VECTOR).

I then finalize the camera matrix to
camera_matrix.inverse(camera_matrix) * osg::Matrixd::rotate(-M_PI/2.0, 1, 0, 0).

Is this logic sound for what I am trying to do?

Thanks

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=59614#59614





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to