measure angle between 2 vectors

   8809   2   0
User Avatar
Member
64 posts
Joined: Oct. 2009
Offline
I would like to measure the angle between 2 vectors, is there a node to do that ? thanks
User Avatar
Member
192 posts
Joined: Nov. 2008
Offline
You want to take the dot product. Make sure your vectorz are normalized.

gl dude.

http://www.sidefx.com/docs/houdini10.0/expressions/dot [sidefx.com]

http://www.sidefx.com/docs/houdini10.0/vex/functions/dot [sidefx.com]

edit: oh yea, the result is the cosine of the angle so your angle would be the arcosine of the dot product.
Edited by - Oct. 7, 2010 23:35:01
User Avatar
Member
1926 posts
Joined: Nov. 2006
Offline
To get the angle between two vectors you'll need to perform some operations using the dot (scalar) product between the vectors.

http://en.wikipedia.org/wiki/Dot_product [en.wikipedia.org]

You could do this using hscript, HOM, or VOPs.
Graham Thompson, Technical Artist @ Rockstar Games
  • Quick Links