File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -255,7 +255,7 @@ fn debug_render_aabbs(
255255
256256fn debug_render_bvh ( bvh : Res < ColliderTrees > , mut gizmos : Gizmos < PhysicsGizmos > ) {
257257 for node in bvh. dynamic_tree . bvh . nodes . iter ( ) {
258- if node. prim_count == 0 {
258+ if node. prim_count == 0 && node . aabb . valid ( ) {
259259 gizmos. aabb_3d (
260260 Aabb3d :: from_min_max ( node. aabb . min , node. aabb . max ) ,
261261 Transform :: IDENTITY ,
@@ -264,7 +264,7 @@ fn debug_render_bvh(bvh: Res<ColliderTrees>, mut gizmos: Gizmos<PhysicsGizmos>)
264264 }
265265 }
266266 for node in bvh. static_tree . bvh . nodes . iter ( ) {
267- if node. prim_count == 0 {
267+ if node. prim_count == 0 && node . aabb . valid ( ) {
268268 gizmos. aabb_3d (
269269 Aabb3d :: from_min_max ( node. aabb . min , node. aabb . max ) ,
270270 Transform :: IDENTITY ,
You can’t perform that action at this time.
0 commit comments