I successfully implemented a third person camera like this.
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).
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.