BeachBoy 1 Posted October 18, 2020 Hey all, I was working on a tool to instance branches along a curve when I ran into a slight issue with cross products. I'm trying to find the perpendicular axis between the tangent along a curve and a side vector so I could pitch a branch up or downwards but the vector returned by the cross function seems to pointing a weird way. If anyone would be so kind as to take a look at this, I'd greatly appreciate it! Thank you. CrossProd_weirdness.hiplc Share this post Link to post Share on other sites
ikoon 255 Posted October 20, 2020 Hi Irvin, in the attached picture ... by typing only @tan you cast the vector into the float. You read only @tan[0]. And then you store that float into the vector tan. If you want to read custom vector attribute, you have to type v@tan 1 Share this post Link to post Share on other sites
haggi 36 Posted October 20, 2020 (edited) Quote vector normal = @N; vector tan = @tan; Instead of using @tan, you should use v@tan. Houdini only recognizes default attributes correctly. So if you use @tan, it is interpreted as one single float for all three axis. Ah.... juse a few minutes too late Edited October 20, 2020 by haggi 2 Share this post Link to post Share on other sites
BeachBoy 1 Posted October 20, 2020 Hey Ikoon & Haggi, Thanks, this does the trick. This is very helpful to keep in mind for the future!! 1 Share this post Link to post Share on other sites