mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
returning at least 1 for grid size in getGridSizeFromSphere()
This commit is contained in:
parent
07c2787a39
commit
f6b0191067
@ -52,7 +52,7 @@ class CartesianGridBase:
|
|||||||
sphereRadius = Vec3(xMax,yMax,0).length()
|
sphereRadius = Vec3(xMax,yMax,0).length()
|
||||||
|
|
||||||
# sphereRadius = max(sphereRadius, gridRadius*cellWidth)
|
# sphereRadius = max(sphereRadius, gridRadius*cellWidth)
|
||||||
return 2 * (sphereRadius // cellWidth)
|
return max(2 * (sphereRadius // cellWidth), 1)
|
||||||
|
|
||||||
def getZoneCellOrigin(self, zoneId):
|
def getZoneCellOrigin(self, zoneId):
|
||||||
# It returns the origin of the zoneCell
|
# It returns the origin of the zoneCell
|
||||||
|
Loading…
x
Reference in New Issue
Block a user