Paran

11-27-2009, 03:13 PM

Hi,

I successfully implemented a third person camera like this (http://www.gamedev.net/reference/articles/article1591.asp).

It works perfectly.

But my problem is now, that I only get the object's rotation, which the camera should follow, as a quaternion from the Bullet physics engine. I especially require the rotation around the Up-Axis ("y"-axis in my case) but every method to convert quaternions to euler angles, that I could find, uses arcsin to get the angle (e.g. here (http://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToEuler/index.htm)).

Because it uses arcsin, the y-rotation is always limited to -90 until 90 degrees, resulting in a camera, that can only partly rotate with the object (only in half range).

So the question is now: How can I get the full-range up-axis rotation information from a quaternion?

Or is this the complete wrong way to go? (since I searched and tried now for days but couldn't find anything)

Please help me, this issue keeps me from further developing my game and I can't solve it. :(

Regards

I successfully implemented a third person camera like this (http://www.gamedev.net/reference/articles/article1591.asp).

It works perfectly.

But my problem is now, that I only get the object's rotation, which the camera should follow, as a quaternion from the Bullet physics engine. I especially require the rotation around the Up-Axis ("y"-axis in my case) but every method to convert quaternions to euler angles, that I could find, uses arcsin to get the angle (e.g. here (http://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToEuler/index.htm)).

Because it uses arcsin, the y-rotation is always limited to -90 until 90 degrees, resulting in a camera, that can only partly rotate with the object (only in half range).

So the question is now: How can I get the full-range up-axis rotation information from a quaternion?

Or is this the complete wrong way to go? (since I searched and tried now for days but couldn't find anything)

Please help me, this issue keeps me from further developing my game and I can't solve it. :(

Regards