Projecting a gameobject onto another

Hi everyone !
I’m working on a small project about a zombie shooter, the only thing is i find myself stuck with this problem.
I’m trying to project a small wooden plank onto a gameobject (i.e. a house) in order to make barricades. I’ve succeded to make the plank stick to the wall of the house (w/ Raycasting) but i can’t figure how to give it the correct rotation so the flat surface of it is attached to the wall as well.

Help would be much appreciated!

With raycasting, you can obtain the surface normal where the ray intercects. That normal is a vector that tells you how the surface is oriented, so you can use it to orient your wooden plank object.

1 Like

Can you make an example?
Thank you btw!

EDIT: nvm i found it myself.

Your welcome. Great you find it yourself!