merwaaan / bevy_spritesheet_animation

A Bevy plugin for animating sprites that are backed by spritesheets
MIT License
50 stars 3 forks source link

Add AnimationSystem and Sprite3dSystem system sets #13

Closed mgi388 closed 1 month ago

mgi388 commented 1 month ago

The animation system updates texture_atlas.index. The sprite3d systems operate on texture_atlas.index. So I think that the sprite3d systems should run after animation.

This manifests in my project as me needing this system ordering:

In project the use looks something like this:

app.add_systems(
    Update,
    update_animations,
    .run_if(in_state(AppState::MyState)),
);

app.add_systems(
    PostUpdate,
    update_anchor_and_size
        .after(AnimationSystem)
        .before(Sprite3dSystem)
        .run_if(in_state(AppState::MyState)),
);
merwaaan commented 1 month ago

Thanks 👌