bevy_tilemap icon indicating copy to clipboard operation
bevy_tilemap copied to clipboard

Chunks despawn when moving camera

Open mjhouse opened this issue 2 years ago • 6 comments

Bevy Tilemap version

commit: 474bd2f012075f7eec10579462135c1f0085a0bf

Operating system & version

Ubuntu 20.04

What you did

Modified hex_tile_odd_rows example to allow panning and zooming (re-scaling).

What you expected to happen

The view can be panned/zoomed, and the map remains static.

What actually happened

All chunks except (0,0) de-spawned immediately.

Additional information

bevy_tilemap_camera_chunks_bug

mjhouse avatar Nov 24 '21 22:11 mjhouse

This should just be related to how the example is programmed though? Not the actual logic of the code itself?

joshuajbouw avatar Dec 09 '21 10:12 joshuajbouw

@joshuajbouw Sorry for the late reply, I didn't see the notification. I'm not sure about the logic. Nothing I saw seemed to account for the despawn, but at this point my memory is a little fuzzy. When I get a chance, I'll try to reproduce this and verify that it's not a mistake on my part.

mjhouse avatar Dec 11 '21 13:12 mjhouse

The despawn happens since I believe that auto spawn is on which would handle spawning / despawning of chunks.

joshuajbouw avatar Dec 11 '21 16:12 joshuajbouw

Would auto spawn despawn chunks on transformation? Is that expected behavior?

mjhouse avatar Dec 11 '21 18:12 mjhouse

It can yeah, camera movement, what it can see. Basically.

joshuajbouw avatar Dec 11 '21 18:12 joshuajbouw

Oh ok, that's good to know. I've only been working with single chunks for now, but I'm going to get into much larger maps later.

mjhouse avatar Dec 11 '21 20:12 mjhouse