- Home /
How to place 3D model door into wall need to fit at runtime ?
I need some help about Placing 3D door or window into wall ,wall created in unity at runtime. need to fit that door in wall like given reference image.so if any one have any sample or link plz suggestion to me so that will help me
[1]: /storage/temp/183140-img-202107071.png
Do you just need it to be positioned right or do you need it to create a hole in the wall too.
I need only positioned no need hole in the wall.
Answer by Harry_Drew · Jul 07, 2021 at 12:02 PM
Well if you want the door to be able to open and act like a proper door then you'll need the effect of cutting the wall which could be done in 2 ways with a boolean difference cut or using a mask shader. Here is a link to the latter to show you how to cut the wall which the door can then be placed into. https://www.youtube.com/watch?v=cHhxs12ZfSQ Hope this helps. -Harry
EDIT: i realised you don't need to cut the wall thanks to your comment. Just make sure the origin of the door is in the center of the door and the origin of the wall in the center of the wall. Then just set the position of the door equal to the position of the wall with an x-offset so you can move the door about in the wall
Your answer
![](https://koobas.hobune.stream/wayback/20220613035936im_/https://answers.unity.com/themes/thub/images/avi.jpg)