Vector::dot?
Posted: Thu Feb 12, 2015 12:19 am
I need some help figuring something out...
I'm writing a function that determines if a player is on the correct side of the terrain, regardless of the rotation of the terrain.
Currently, it checks if the terrain rotation is "0 0 0" or NOT "0 0 0", assuming that it is either right side up, or up side down... However, there are other rotations to consider... For instance, there are a couple of maps in the Annihilation map pack that have terrain at odd angles...
I was looking at some deploy functions and noticed they used Vector::dot to determine if the surface you are deploying on is close to level or not, and was wondering if any of you geniuses could explain how it works (or more importantly, what range of return values I should test for).
I'm writing a function that determines if a player is on the correct side of the terrain, regardless of the rotation of the terrain.
Currently, it checks if the terrain rotation is "0 0 0" or NOT "0 0 0", assuming that it is either right side up, or up side down... However, there are other rotations to consider... For instance, there are a couple of maps in the Annihilation map pack that have terrain at odd angles...
I was looking at some deploy functions and noticed they used Vector::dot to determine if the surface you are deploying on is close to level or not, and was wondering if any of you geniuses could explain how it works (or more importantly, what range of return values I should test for).