Blender_bevy_components_workflow
Blender_bevy_components_workflow copied to clipboard
is there a way to customize animation speed per entity
Thank you for this amazing crate!
basically the title. For example I have two models and want to speed up or slow down depending on the entity I query
With a bit of guidance I'm interested in doing a PR with this
ok, I found a way but it's weird. I think user friendlier options mimicking bevy players style should be nice:
// instead of
...
let Some((&playing_animation_index, _)) = animation_player.playing_animations().next()
else {
continue;
};
let playing_animation = animation_player
.animation_mut(playing_animation_index)
.unwrap();
let speed = playing_animation.speed();
playing_animation.set_speed(speed * $speed_mult);
...
// maybe something like this might be friendlier?..
let speed = blenvy_animation.speed(players);
blenvy_animation.set_speed(players);
the API obviously not the best, for one: it might be possible to get the relevant players from blenvy plugin, but I'm not a bevy expert so do not know at the moment
I will try to sketch a solution after jam :)