Originally Posted by Bribe
Is there a way to rotate a vector considering the Z value
with the rotation?
I suspect not in this library, based on that it's only rotating
the X and Y. I wonder what kind of complexity we'd deal
with if we had to factor in all three dimensions into the
I'm not sure what you mean by that, but this library is capable of rotating a vector around any axis, whether it's vertical or pointing sideways.
I'm also unsure of what the purpose of "terrainNormal" is.
It takes four corners into consideration but what if the center
is a bit indented/raised offset from the rest?
That doesn't really matter. The purpose of the function is to get a vector perpendicular to the terrain surface. Sure, the results get smoothed in some cases (as you move across a terrain grid line, the actual terrain normal will change instantly while the one returned by Vector will change gradually) but in most cases you'd want that anyway and if not you can always use a very small sample radius.