-
Notifications
You must be signed in to change notification settings - Fork 481
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
How to reverse the animation ? #43
Comments
Hi @izzatzr, one way you could do this right now is by using a custom controller which applies the animation in reverse. For example, take a look at main.dart in the penguin example: You could apply the "music_walk" animation (stored in the ActorAnimation _rock variable) in reverse by changing the apply call to use a _rockTime that is relative to the end of the animation. Something like this:
|
It'd be great to have |
I ran into this problem as well @izzatzr. What I decided to do was just to make one animation for running forwards and one for running in reverse, which was super easy (just swap the start & and key frame positions in Rive). Then I just used a bool to swap between the two FlareActor(
'assets/animations/animation.flr',
animation: widget.animationSwitch ? 'forward' : 'reverse',
), This isn't the best solution but it works!
|
Is there any way to change the key frames pragmatically ? |
I want it first display the animation and then do it in reverse, but i have no idea how to accomplish this
The text was updated successfully, but these errors were encountered: