When working with ThreeJS, I need to determine how to find the coordinate of a point that is exactly 1 unit in the direction the camera is facing, even when the camera is rotated at various angles.
The rotation angles in ThreeJS can be quite confusing for those unfamiliar with them.
For instance, if all rotation variables are set to 0, then the expected result would be (0, 0, -1).
If the rotation around the x-axis is Pi / 2 (90 degrees), then the expected result would be (1, 0, 0).
I am looking to create a function to accurately calculate this. The main focus should be on the mathematical aspect of it.