Polygons return 0 for the get volume call
LadyCailinBot opened this issue ยท 5 comments
WORLDGUARD-2770 - Reported by Hekta
msg(array_get(sk_region_info($, pworld()), 5))
For example for one of my cuboid type regions, return 2440.0, work fine
But for all my poly2d type regions (all my poly2d regions are octogonal), always return 0.0
'''Mod Edit: Moved to WorldGuard since this is caused by WG always returning 0'''
Comment by jb_aero
If you write the code/math to determine the volume of a region given only the points, I'm sure it will get added. Otherwise, nobody's going to take the time to figure that out if WorldGuard doesn't provide it.
Comment by Dark_Arc
I'm going to take care of this over the weekend with any luck. There's a couple different approaches I have in mind, one may even provide a performance improvement with contains calls, but we'll see.
Comment by sk89q
Don't think you are going to beat the performance of {{return 0}} :P
Comment by Dark_Arc
Improvement to the contains method for polygons, not to the volume calculation silly :P Also, we might have true polygon borders instead of jagged edges.