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

jagernicolas at legtux.org jagernicolas at legtux.org
Wed Jul 22 08:22:16 PDT 2015


 

bump 

On 2015-07-20 14:30, jagernicolas at legtux.org wrote: 

> 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. 
> 
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org [1]

 

Links:
------
[1]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20150722/eee81d85/attachment-0003.htm>


More information about the osg-users mailing list