Another way of saying this question: How do I find the length, width and height of a cuboid given it’s diagonal length and 2 rotational angles.
This is for a 3d game where the user can change up/down rotation (UP and DOWN arrow keys), left/right rotation (LEFT and RIGHT arrow keys) and the object can accelerated and reverse (Q and w). Each frame, the objects x, y, z gets updated according to it’s current speed and up/down and left/right rotation.
If
alphais the left/right angle andbetais the up/down angle, thenAssuming, that no rotation will return the direction (0, 0, 1)