Hello,
I am writing a 3D first person game, and i came to a problem with converting spherical coordinates to Cartesian coordinates. The problem is with how I use my axis (which i don't want to change because i got used to them). I know that even Wikipedia gives an example of the conversion, however, I have a slight problem with it.
The example on Wikipedia has two angles:
*phi = on the XY plane
*theta = on the ZY plane.
Also, the Wikipedia example assumes the X axis is positive backwards, Y axis is positive to the right, and the Z axis is positive up.
Reference: http://en.wikipedia.org/wiki/Spherical_coordinates
My problem is that my coordinates are as follows:
+X = left
+Y = up
+Z = forward
And I have two angles:
*phi = on the XZ plane
*theta = on the YZ plane.
I know it should be simple to figure out how that conversion goes based on the Wikipedia example, but I simply can't visualize it :(
Does anyone know how to convert that into Cartesian coordinates?
All help is appreciated.