> regarding your last post, did you mean that you also tried to extract angles from a rotation with the website's "matrixToEuler" or a similar approach, but you encountered problems that were depended on your current camera-orientation?
It was quat to Euler http://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToEuler/index.htm > i'm not sure what you are meaning with "..it was not a success.." > does the attachment you included work, and won't it suffers from symptoms, like described above? The code is correct to the best of knowledge and of the tests I did, it worked well. The problem is that it wasn't compatible to the needs of what I needed to do. It has been over a year since I had dealt with it, and so I don't quite remember the details except to say that it appeared to always interpret the delta's from a global orientation perspective. What I needed is the deltas from its current local perspective, so for example if I just turned the yaw, and watched the numbers... it looked correct. The same is true for the pitch and roll where I would start from the global orientation and turn one axis exclusively. Now lets say I apply a 45 angle pitch and then apply a pure yaw rotation from this new orientation the Euler angles would interpret that both yaw and pitch were changing, because from a global orientation they were. Once I figured out that this wasn't what I needed I finally saw the beauty of the quaternion and the code snip that I initially sent is what I use today. ----- Original Message ----- From: "Christian Sam" <osgfo...@tevs.eu> To: <osg-users@lists.openscenegraph.org> Sent: Thursday, June 04, 2009 1:51 PM Subject: Re: [osg-users] get the x-axis angle of a rotation > Hi james, > > regarding your last post, did you mean that you also tried to extract angles from a rotation with the website's "matrixToEuler" or a similar approach, but you encountered problems that were depended on your current camera-orientation? > > i think the same happened to me: i wanted to get the pitch-angle of the camera-orientation, to adjust the camera looking straight forward in certain cases. (think of some: reset view, but only for the pitch angle). i encountered that multiplying with the inverse rotation matrix of that angle didn't work if a left or right camera-rotation has been done before. > (actualy these negative-effects were only obvious when left/right rotation was larger than 45°. so i don't know if also minor yaw-rotations did harm, or only rotations exceeding a 45° threshold) > > in the end, it put out that i had to build the adjustment-rotation matrix not with the pitch but the roll angle of the current camera-rotation in cases of previous left/right camera-rotations from 45° to 135° (respectively -45° to -135°) > > 3.) > i'm not sure what you are meaning with "..it was not a success.." > does the attachment you included work, and won't it suffers from symptoms, like described above? > > > Thanks in advance, > Christian > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=13519#13519 > > > > > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org