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

minZ and maxZ for CircleZones (Cylinders) #24

Closed mkafrin closed 4 years ago

mkafrin commented 4 years ago

Right now, CircleZones can only use the "useZ" option, which switches them back and forth from "circle" mode and "sphere" mode. We could add a third "cylinder" mode, by enabling the use of minZ and maxZ. This is only worth it IMO if the performance hit isn't too big.

Creation would have to be updated as well, but we could model the changes off of how BoxZones handle minZ and maxZ. Also in the process it would be good to add a way to move the CircleZone up and down when in "sphere" mode.

mkafrin commented 4 years ago

Implemented 75fb57e38e6436de4da8df899a52611086e7b959 in separate branch. This results in a 33% slowdown in CircleZones though, which is unacceptable IMO. If this is merged into master, it will need to be as an entirely new zone type probably. Closing this for now, but may revisit in the future.