Can someone give me an explanation about how to use the Quaternion class in libGDX to move my camera around a sphere or just set it up, manipulate it, and apply it general? I am trying to acheive orbiting my camera around a sphere without gimbal lock, and I'm not having any luck getting the camera to do anything by using quaternions...
Tell me more
×
Game Development Stack Exchange is a question and answer site for
professional and independent game developers. It's 100% free, no registration required.
|
|
|||
|
I ended up getting this to work. To apply a
This is exactly the same as the update() method in the |
|||
|
|
Quaternionand initilized it to x=0, y=1, z=0, w=PI/2... but no matter what I change those values to and try to apply it to the camera, I'm not seeing any changes. I assume I'm supposed to set the view matrix to the matrix that is formed by the quaternion but it's not working and I'm not seeing how that will change my position around the sphere. I also don't know how to update the quaternion values dynamically to move it. – Kieran Dec 14 '12 at 17:44