I need to create a vector up when the camera looks at any angle (except for straight down or up, because the vector up will be perpendicular to the y axis).
The up vector should be perpendicular to the line of sight of the course. When the line of sight is not along the y axis, you can imagine a circle around the eyes and a line of sight where the vector may be up. There will be a point on this circle that moves farther along the y axis than any other point. This is what I want my up vector to be.
Iβm sure I can work out a solution, but I assume that people would have done it many times before, and I want to have the most effective solution.
My camera, when used, will at least not look directly down or up on the Y axis so that there are no problems.
source
share