- Home /
align building prefab to a road prefab at runtime
I was wondering if anyone knew a way to align a building prefab to a road prefab at runtime when a building is placed. I already have scripts that let me place buildings and such so I only need help with aligning (or snapping in other words) a building prefab to a road prefab as the building prefab is moved closer to the road. The terrain is completely flat and roads will be pre-placed on the terrain at 90 degree angles. I myself cant think of any way to do that so maybe somebody can point me in the right direction on how to go about it. Thanks.
Your answer

Follow this Question
Related Questions
Use Prefabs on different Computers 1 Answer
snapping objects at runtime 2 Answers
Snap point to point on another prefab 1 Answer
Snapping a picked up object into a slot/space 0 Answers
Trouble with prefabs and activating each other's scripts 1 Answer