What do you want to achieve?
I want a building system inside of my game exactly how roblox has it’s building system when it comes to placing down attachments.
What is the issue?
I don’t know how to make it
What solutions have you tried so far?
I’ve tried youtube, this devforum, etc. Can’t find one.
Additional info to replicate behavior:
The roblox grid system is 0.125 studs; It places the attachments at 0.125 stud intervals. For example: These four attachments have the positions: -14.125, 0, 0 / -14, 0, 0 / -13.875, 0, 0 and -13.75, 0, 0.
They’re also half way inside whatever part they’re placed on:
I did this in about 10 seconds, just a super easy grid/placement system.
grid system is easy:
Suppose you have a random position 0.142, 0, 2.107
you want the interval to be whatever studs, so you will round them like this:
for x:
first divide by interval you will get 0.142/0.125 = 1.136
round it up it will become 1
now multiply it back by interval, 1*0.125 = 0.125
for z:
first divide by interval you will get 2.107/0.125 = 16.856
round it up it will become 17
now multiply it back by interval, 17*0.125 = 2.125