This is my system:
On item selected from inventory --> Ghost (semi-transparent) object is instantiated and positioned and rotated according to the player and terrain
OnClick --> Ghost is destroyed and prefab is added in its place.
This system works very well and looks great... The only problem is players have to carefully maneuver to get the walls etc straight and aligned with other walls. The system is very similar to Rust. I would like players to still place anything where they want but: I want the system to to align walls when the ghost gets held adjacent to another wall and a roof over 4 walls to be automatically positioned...
I have no problem with implementing any system (I know C# very well, professionally). I just want some ideas on what the best way is to do this?
My idea was to add a box collider (as a trigger) to object and use OnTriggerEnter to change the position. Is there a better/cleaner/easier way?