Can anyone advise as to how I wrap an object into an angle of 0 to 360 in its xy and z axes?
I have a 3d spaceship with a cube behind and above it, my camera seeks to the cubes position but I am having difficulty making my camera roll to the same plane so as to see the ship the correct way up.
it is the rota# value here:-
setcameralookat(1,getobjectx(1),getobjecty(1),getobjectz(1),rota#)
I find it complex because of the angles that an object reports behave oddly once you have rotated the object beyond 90 in its x axis in that y and z flip to 180 and that is just simply rotating the x alone.
Is it that I have to define my objects rotation between 0 to 360 somehow with quaterions so it is easier to ascertain how much rota# needs to be whichever direction the ship points in 3d space?
Rotation advice needed
Thx