Hi, so I've been using the normal vector to align parts with different surfaces. Although I don't know how to make it work with cylinders. I need the flat part of the cylinder to face up.

Could anyone give me an idea on how to accomplish this?

Gif: http://gyazo.com/b4d9ab5566adbcb91b19e6aca1bba0e1

1 comment

0

I'm not completely sure, but just from testing in studio it seems like cylinders always spawn with the flat ends facing the x axis. so, if you have the normal vector, just rotate the cylinder by 90 degrees along its z axis and offset using half its x size instead before you calculate the rest. also, neat gif!