Thread: Vector
View Single Post
Old 07-12-2011, 12:42 PM   #46
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,190

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

Quote:
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
equations.
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.

Quote:
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.
__________________
Anitarf is offline   Reply With Quote
Sponsored Links - Login to hide this ad!