Re: [osg-users] [3rdparty] How to change camera's yaw and pitch, and move front, back and sideways according to that?

2020-05-12 Thread OpenSceneGraph Users
Hi Sam, I managed to implement my own manipulator (OVNIController, derived from FirstPersonManipulator), but still can't change the camera position (I want to change it in the beginning of the program, and also when the user press the Home key). You can see my code here:

Re: [osg-users] [3rdparty] How to change camera's yaw and pitch, and move front, back and sideways according to that?

2019-01-31 Thread Sam Brkopac
Hi Rodrigo, The Camera::setViewMatrixLookAt function is equivalent to the gluLookAt. You can find more documentation on the inner workings here (https://stackoverflow.com/questions/21830340/understanding-glmlookat). If you don't set a camera manipulator prior to viewer.run() and move the

Re: [osg-users] [3rdparty] How to change camera's yaw and pitch, and move front, back and sideways according to that?

2019-01-31 Thread Rodrigo Dias
Dear Trajce, do you have any idea how incomplete is your answer? There's no point in knowing the function if I don't know how to set its parameters correctly. What everybody learning OSG need is "a simple source code showing how it's done", and this means a few lines of code, not less than a

Re: [osg-users] [3rdparty] How to change camera's yaw and pitch, and move front, back and sideways according to that?

2019-01-31 Thread Trajce Nikolov NICK
Hi, viewer.getCamera()->setViewMatrixAsLookAt On Thu, Jan 31, 2019 at 10:01 AM Rodrigo Dias wrote: > I want to change the camera direction with the mouse, and position with > the keyboard. I've found an example on how to change the position, but > still couldn't find anything explaining how to

[osg-users] [3rdparty] How to change camera's yaw and pitch, and move front, back and sideways according to that?

2019-01-30 Thread Rodrigo Dias
I want to change the camera direction with the mouse, and position with the keyboard. I've found an example on how to change the position, but still couldn't find anything explaining how to change the direction (and not sure if the position will change correctly when the direction changes). All