-
Notifications
You must be signed in to change notification settings - Fork 68
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
Adding new tweens to existing ones #115
Comments
You could use tracks, but you'd have to recreate the looping tween which would be tedious. |
A similar need I have (I'm not sure if this should go here or in a new issue) is to tell a tween to run after the current tween. To do this I need one of the following:
I also need a way to know when the current animation will end - but I think I can get that via the existing The second option is probably the best one, but I'm too new to writing APIs in rust to have a clear idea. |
@musjj sorry I completely missed this issue.
Yes indeed. So you're stuck with a single animator, unless you can reparent your scaled object to an invisible rotating one? If not, then the way I'd approach it in this case given the two animations are widely different is to put the logic into a custom |
I'm not sure I understand. It seems that you want to animate first the color and then the alpha of the same material or sprite? If so, you can just use If, on the other hand, you're trying to execute a tweenable on one |
I think a simple solution would be to allow Animator::new(tween).with_entity(entity) This way you can just spawn multiple animator entities targeting the entity you want. This is similar to the approach used by bevy_tween, except that it traverses up the parent hierarchy until it finds a target marker. |
Let's say I have an entity that is set up with a tween targeting the entity's
transform.rotation
. The tween loops infinitely throughout the game.But I also want to have a system that can insert a new tween that targets said entity's
transform.scale
, depending on the state of the game. The tween loops only once. I also want to be able to replay that tween, depending on the game state.The problem is that this requires you to put more than one
Animator<Transform>
component on the entity, which is currently not possible in Bevy. Is there a good solution for this use-case?The text was updated successfully, but these errors were encountered: