[osg-users] my own camera manipulator, moving forward, and stuffs.

jagernicolas at legtux.org jagernicolas at legtux.org
Mon Jul 20 11:30:46 PDT 2015


 

Hi there! 

I try to write my own camera manipulator to work with a gamepad. I get
the status of each axis/button every frame trough glfw, I can make the
camera moving and rotating but I failed when I try to mix both. 

I try for days now to make my camera moving forward. There is any
example somewhere which can show me how to do that ? 

I tried different ways to solve this problem : 

- first, I dug the api, I found this function : _getFrontVector()_ .I
was expecting to get a vector pointing in the direction from the _eye_
to the _center_, but I always get the same result. Of course I can mess
something with my code, so tell me if this function should actualy point
like I was expecting, and if not, I'm curious to know what is the point
to have that function. 

- second, I calculated the vector from eye to center. In that case my
camera was shacking. I quikly forget this method. 

- third one (I burned my time on this one), I tried to compute the
matrix, but I don't remember my matrix-algebra if I should do first the
rotation then the translation or otherwise... also I don't know/remember
If I should set/get the matrix or his inverse... 

- four, today : contact the mailing list. 

Best regards, 

Nicolas. J. 

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20150720/8d7fe6b4/attachment-0002.htm>


More information about the osg-users mailing list