I’m trying to make a plot placement system with rotatable parts. I initially ran into the problem that blocks would place halfway inside each other. because I would set the part’s position directly to the Target position of the mouse.
I accounted for that by adding to the position of the new block in whatever direction the Target Surface is. here’s what I wrote to do that: (I know it’s horrendous but idk how else to write it)
however when I added the ability to rotate blocks, I ran into a problem. for example, if the player rotates a block 180 degrees so that it is upside down, the Top surface of the part will now be facing down, and it messes up the script above by adding in the wrong direction.
my bad if it’s a bit confusing, but is there a better way to ensure that blocks will not overlap when placed, regardless of rotation?