Hi Devforum,
I’m trying to create a system that will split my game’s workspace into various grid pieces based on the amount of models and BaseParts in the game. The idea being that, if I want to create (example) 4 grid zones in a map that is 300 x 300, I can identify 4 grid zones that are 150 x 150 respectively (such as getting the Vector3 positions of the boundaries of the zones).
This isn’t difficult to set-up with fixed values, but what I’m interested in is scalability. That way I can call the same function, and depending on how large my workspace contents are, I can get different grid sizes. I’ve had issues with workspace:GetBoundingBox and workspace:GetExtentsSize returning improper sizes that far exceed the size of my actual workspace contents. An added benefit is that I don’t have to manually change the numbers every time the map is expanded and new stuff is added.
Does anyone have any tips on how to go about setting this up?
Thank you!