I am working with player maximum slope angles.
If I have a normalized 3D vector that gives the normal of the slope, how do I turn that into an angle? Assume y is the up direction. If I only consider the x and y vector components, it's easy. But when you add a z component, you can no longer determine the angle from y alone.
If the normal is [1,1,1], the normalized normal will be [0.577350259,0.577350259,0.577350259] and the angle will be 45.0. If the normal is [1,1,0] the normalize normal will be [0.70710681,0.70710681,0.0], and the angle will still be 45.0.
If I have a normalized 3D vector that gives the normal of the slope, how do I turn that into an angle? Assume y is the up direction. If I only consider the x and y vector components, it's easy. But when you add a z component, you can no longer determine the angle from y alone.
If the normal is [1,1,1], the normalized normal will be [0.577350259,0.577350259,0.577350259] and the angle will be 45.0. If the normal is [1,1,0] the normalize normal will be [0.70710681,0.70710681,0.0], and the angle will still be 45.0.