[osg-users] osgoculus viewer picking

Björn Blissing bjorn.blissing at vti.se
Wed Nov 8 07:23:02 PST 2017

Hi Michael,

I guess you mean head tracking and not eye tracking.

But that should be fairly straight forward. Create a line segment emanating from a point between the eyes and use that to calculate the intersections. There is no need to go from 2D to 3D in this case. The only thing you need to do is to recover the head position and orientation from the OculusDevice class. Either by writing your own method that publish that data directly from the Oculus SDK or by recovering that from the view matrices (which already have a public interface in the OculusDevice class).


Read this topic online here:

More information about the osg-users mailing list