I know about rounding the position of the object to the nearest unit. I don't want to use that because it becomes inaccurate with different size objects.
I'm wondering how I would go about creating a grid placement systems that can be used on both models and individual parts.
If I have a part that is exactly 1 × Y × 1 studs, it would snap to the center of the nearest stud. That is possible using the rounding method.
If I have a part that is exactly 4 × Y × 4 studs, it would snap to the center of the nearest 4 studs. If I use the rounding method for this case, the part will snap to the nearest stud. That puts the center of my object at X.5 × Y × Z.5.
If someone could point me in the right direction here, I'd really appreciate it.
Thanks!

4 comments
Seems kind of hacky but I just thought of something.
If the resulting position is a decimal, I could add to the decimal to make it a whole number.
I know this question is already answered, but if I understand it right, if you have a part at so you want it to snap to a multiple of 4, so, 0, Y, 0, then 4, Y, 4, then 8, Y, 8 and so on, so both 13.758 and 10.962 would snap to 12, right? Well, that very easy, divide the current position by the # you want (4 in this case), round it to the nearest whole #, and then multiply by 4 again
I know this question is already answered, but if I understand it right, you want it to snap to a multiple of 4, so, 0, Y, 0, then 4, Y, 4, then 8, Y, 8 and so on, so both 13.758 and 10.962 would snap to 12, right? Well, that very easy, divide the current position by the # you want (4 in this case), round it to the nearest whole #, and then multiply by 4 again. Lets take 13.758. Divide by four: