Euler angles to Cartesian Coordinates for use with gluLookAt
- by notrodash
I have searched all of the internet but just couldn't find the answer. I am using LibGDX and this is part of my code that loops over and over:
public void render()
{
GL11 gl = Gdx.gl11;
float centerX = (float)Math.cos(yaw) * (float)Math.cos(pitch);
float centerY = (float)Math.sin(yaw) * (float)Math.cos(pitch);
float centerZ =…