Hello!
I’m working on a system that allows users to design their own shops in a basic 6x6 grid, each tile being 5x5 studs so the whole plot is 30x30 studs. But I’m wondering how I’d go about making collisions or something similar to collisions. All items will fit inside of a 5x5 boundary so I don’t really care about physical collisions, rather I’m looking at a more efficient way to ensure 2 items can’t be on the same grid tile. I want to avoid iterating through the plot’s objects as well. I was thinking of creating a sort of grid system that uses nested tables, something like this, but 5 times in total to account for all 6 rows of items:
tiles = {
{[1] = nil, [2] = nil, [3] = 'some object'; [4] = nil, [5] = 'some object', [6] = nil}
}
The issue with that is that it seems hacky and a bit unreliable. I’m also considering allowing people to place items on other items, like tables and podiums so ideally whatever system would account for that as well. Any other ideas?