Hello all.
In my new game I have a system to detect what zone a player is in (for purposes like cheat detection or music changes).
Currently, each zone is assigned a giant detailed union and the zone val is changed depending on what union the player is touching.
What better method is there for this?? My current method is very bad for performance and often has weird hitboxes.
I think even under the situation where the zones are insanely detailed you would probably still have better results and more exact hotboxes just using parts. Unless of course, your zones are for some reason the shape of the Mandelbrot set, then you have simultaneously achieved the impossible (in terms of Roblox) and have gone far outside the bounds of any help you could find here, let us hope you have not made your zones Mandelbrot set shaped.
In all seriousness though, if you are looking for better performance and more accurate hotboxes then I would recommend using parts instead of unions, even under a situation where you have to add five extra parts for each zone. Five extra parts will most likely run better than the calculations that Roblox has to do for each union.