Hi Mike, I think the problem is the choice of the vector used to calculate the azimuth/heading. The switchover at 90 and -90 roll indicates that a vector to the side of the object is used and not to its front. If a vector to the front is used, the switch should occur at pitch 90 and -90.
try double azim = atan2(localToFrame(1,0),localToFrame(1,2)); as an example cheers jp Mike Illuzzi wrote: > I tried the latest nightly build marked 7-31-06 but it doesn’t appear to > fix the problem. > > > > In my application I’m actually using the transform matrix > directly…grabbing the forward vector and taking the atan2(x,y). I tried > shoving the matrix into a quat and then pulling the yaw out from there > via atan2(2*(x*y + w*z), w*w + x*x - y*y - z*z) and I get the same > results. The fact that I can replicate this behavior in the > NodeTrackerManipulator indicates to me that it isn’t specific to my > application. > > > > Perhaps is there a valid reason for why a 90 degree roll would cause the > forward vector in the matrix to change? > > > ------------------------------------------------------------------------ > > _______________________________________________ > osg-users mailing list > osg-users@openscenegraph.net > http://openscenegraph.net/mailman/listinfo/osg-users > http://www.openscenegraph.org/ -- This message is subject to the CSIR's copyright, terms and conditions and e-mail legal notice. Views expressed herein do not necessarily represent the views of the CSIR. CSIR E-mail Legal Notice http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html CSIR Copyright, Terms and Conditions http://mail.csir.co.za/CSIR_Copyright.html For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR Legal Notice send a blank message with REQUEST LEGAL in the subject line to [EMAIL PROTECTED] This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. _______________________________________________ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/