Login  Register

Re: Issue rotating camera

Posted by Sven Gothel on May 10, 2014; 12:44pm
URL: https://forum.jogamp.org/Issue-rotating-camera-tp4032302p4032303.html

On 05/10/2014 01:14 PM, MichaelMitchell [via jogamp] wrote:
> I am having trouble rotating my camera.
> I move it based on two angles (in radians).
> It can move left to right just fine.
> When I look straight up it starts slowing down and will stop.
> Also, when the camera has turned 90 degrees right or left, it will not look up
> or down, it will do an odd spinning thing.

Might be a case of 'Gimbal-Lock'

http://web.archive.org/web/20041029003853/http://www.j3d.org/matrix_faq/matrfaq_latest.html#Q34


Thats why we have com.jogamp.opengl.math.Quaternion,
see
<http://jogamp.org/git/?p=jogl.git;a=blob;f=src/jogl/classes/com/jogamp/opengl/math/Quaternion.java;h=319cbad50f9f212a94eed69186b35a75385cab37;hb=HEAD>.

You may use your fav. IDE and check it's usage (call-tree).

Note: Latest fixed version will be part of release 2.2,
2.1.5 contains a buggy untested version.

~Sven



signature.asc (894 bytes) Download Attachment