Hi folks

I'm sitting here trying to set up a head tracking...
I got an api that spits out a viewmatrix for the camera and now I have to get 
this matrix in the write place.

I wrote an updateCallback for the Cameras (left/right) that looks like this.

class updateCameraPosCallback : public osg::NodeCallback 
{
        virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
        {
                osg::Camera* cam = 
                dynamic_cast<osg::Camera*> (node);
                
                if(cam)
                {       
                        osg::Matrix mat(s->getMatrix().data());
                        cam->setViewMatrix( mat);
                }
        }
        
};

I checked the matrix and it looks ok, but somhow the cameras don't move!

Any tips??

Thank you!

Cheers,
Thomas

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





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to