I have a map, and I want to separate sections of this map into different “districts”. I tried messing with region3, but you can only have a large cube with region3s and I don’t want to use multiple region3s for one district (districts should have interesting shapes, not just big cubes). I don’t want to use touch detection either since there’s no efficient whitelisting/blacklisting, which makes it very ‘laggy’ for maps with a lot of parts to cycle thru.
In general, I want to make an GUI that shows what district you are in and be able to load in assets in a region depending on if there is a player in said region.
Any efficient way to do this? One way I’m thinking of is to calculate a players district using only the position of their humanoidrootpart, but I’m not sure how.
I don’t know how to script that but you can put up signs saying “welcome to (your town/district name) please drive carefully through our (your town/district you can put any of the 2) I guess that will help you if you need a separate idea just message me through ROBLOX by following me.
My strategy for this is defining a region or district by a single part underneath the map and then I perform a whitelisted downcast against these parts to check which area part is hit. If none is hit then I just mark the zone as unknown or out of bounds depending on my game, otherwise the area part that gets hit by the downcast is where the player currently is. I try to make sure the parts are right under the map so that I can keep the ray short and thus inexpensive to cast every frame from Heartbeat.