bevy_ecs_ldtk icon indicating copy to clipboard operation
bevy_ecs_ldtk copied to clipboard

Example/guide animating tile w/ bevy_ecs_tilemap

Open Trouv opened this issue 1 year ago • 4 comments

Title - ideally as an example in the examples directory with a book how-to-guide associated with it

Trouv avatar Mar 26 '24 03:03 Trouv

Hi! I implemented a minimal example based on your description in the discussion about this, but I fail to get it to work. The tiles don't animate.

https://github.com/DirkScharff/animation_problem_minimal

Any additional ideas about getting this to work?

DirkScharff avatar Jul 01 '24 22:07 DirkScharff

Thanks for the great minimal example, and apologies for taking some time to respond to this.

It took me a while to figure this out but apparently the AnimatedTile component's tile index range upper-bound is exclusive. So, it needs to be end: 2 instead of end: 1.

With that change your example works on my machine

Trouv avatar Jul 24 '24 02:07 Trouv

Thanks for the input, I will try it out later. Sometimes its those small things...

Feel free to use the example (or parts of it) in your repository if you want.

DirkScharff avatar Aug 01 '24 09:08 DirkScharff

It does not seem to work for me, neither on macOS nor on windows. Did you perhaps change something else?

DirkScharff avatar Aug 12 '24 20:08 DirkScharff