public void updateCameraVectors() { Vec3f front = new Vec3f(); front.x = (float)(Math.Cos(Yaw * ONEDEGRAD) * Math.Cos(Pitch * ONEDEGRAD)); front.x = GeneralVariables.FCMP(0.0f, front.x) ? 0.0f : front.x; front.y = (float)(Math.Sin(Pitch * ONEDEGRAD)); front.y = GeneralVariables.FCMP(0.0f, front.y) ? 0.0f : front.y; front.z = (float)(Math.Sin(Yaw * ONEDEGRAD) * Math.Cos(Pitch * ONEDEGRAD)); front.z = GeneralVariables.FCMP(0.0f, front.z) ? 0.0f : front.z; Front = front.unit(); Right = Front.cross(WorldUp).normal(); Up = Right.cross(Front).normal(); }