mkafrin / PolyZone

PolyZone is a FiveM mod to define zones of different shapes and test whether a point is inside or outside of the zone
MIT License
202 stars 193 forks source link

Debug draw culling #31

Closed mkafrin closed 3 years ago

mkafrin commented 4 years ago

Look into adding an option for debug draw culling. Basically, even if debugPoly or debugGrid is enabled, only draw if the zone is within a certain distance or in the field of view.

IsSphereVisible could be used potentially to check whether a zone's bounding sphere is in view: https://runtime.fivem.net/doc/natives/?_0xE33D59DA70B58FDF

mkafrin commented 3 years ago

This could obviously help, but considering it only effects debugging and would only really be a significant help when dealing with a very large amount of zones, I don't think it's worth the complexity for now. This could be revisited if it becomes clear later that this is more necessary.