RE: Getting rid of euler angles
2017-02-08, 23:36 (This post was last modified: 2017-02-08, 23:37 by Travis Cobbs.)
2017-02-08, 23:36 (This post was last modified: 2017-02-08, 23:37 by Travis Cobbs.)
Glad to hear you got it working.
Actually, it's because side-to-side motion of the mouse rotates around the camera's Y axis, and vertical motion of the mouse rotates around the camera's X axis. So this flip is expected. I had forgotten about this, so left it out of my original post. LDView swaps those before setting xRotate and yRotate. (In other words, xRotate in my pasted code gets set based on the Y mouse motion, and yRotate gets set based on the X mouse motion.)
(2017-02-08, 14:53)Philippe Hurbain Wrote:Quote:For some reason I had to switch x and y in the glRotate call.LDraw Y axis going down?
Actually, it's because side-to-side motion of the mouse rotates around the camera's Y axis, and vertical motion of the mouse rotates around the camera's X axis. So this flip is expected. I had forgotten about this, so left it out of my original post. LDView swaps those before setting xRotate and yRotate. (In other words, xRotate in my pasted code gets set based on the Y mouse motion, and yRotate gets set based on the X mouse motion.)