Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Animated tiles must be adjacent in the tileset #12

Open
adrien-bon opened this issue Aug 6, 2024 · 0 comments
Open

Animated tiles must be adjacent in the tileset #12

adrien-bon opened this issue Aug 6, 2024 · 0 comments
Labels
limitation Something could work better / does not work but there is an available work-around

Comments

@adrien-bon
Copy link
Owner

This limitation comes from bevy_ecs_tilemap.

Right now, we use the bevy_ecs_tilemap::tiles::AnimatedTile struct which is defined as follow:

pub struct AnimatedTile {
    /// The start frame index in the tilemap atlas/array (inclusive).
    pub start: u32,
    /// The end frame index in the tilemap atlas/array (exclusive).
    pub end: u32,
    /// The speed the animation plays back at.
    pub speed: f32,
}

We only get a start and an end indexes which implies tiles are next to each other in the tileset.

Possible work-around:

  • update the tileset to make sure tiles are adjacent
  • as stated in this issue, we could overcome this by creating our own animation system but it feels a bit out of scope for this crate
@adrien-bon adrien-bon added the limitation Something could work better / does not work but there is an available work-around label Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
limitation Something could work better / does not work but there is an available work-around
Projects
None yet
Development

No branches or pull requests

1 participant