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

Animation Control Problem For Blend One In State Machine (Flutter) #420

Open
BlockRen opened this issue Sep 10, 2024 · 2 comments
Open

Animation Control Problem For Blend One In State Machine (Flutter) #420

BlockRen opened this issue Sep 10, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@BlockRen
Copy link

BlockRen commented Sep 10, 2024

Description:

I've encountered an issue with the control of animations in my Flutter project that the animation is blend in state machine animation.

Animation Implementation Details:

  • The .riv files utilize a state machine to manage the animation flow.
  • Number inputs are employed to control the transitions within the animation flow.
  • Some states within the state machine are blends, which are mixtures of two regular Timeline animations.

Steps to Reproduce the Issue:

  • Retrieve the state machine animation's input using SMINumber.
  • Change the value by calling 'ctrl.value'.
  • While regular timeline animations play as expected, the blend animations do not respond and show no signs of playback.

Reproduction Environment:

Development Environment:

  • MacOS Sonoma 14.5
  • Android Studio Koala Feature Drop | 2024.1.2
  • Device:
    Pixel 4a 5G
    Android Version 14
  • Flutter Environment:
    Flutter 3.22.2 • channel stable
    Framework • revision 761747bfc5 (3 months ago) • 2024-06-05 22:15:13 +0200
    Engine • revision edd8546116
    Tools • Dart 3.4.3 • DevTools 2.34.3

Expected Behavior:

The blend animations should play smoothly alongside the regular timeline animations when the .value is changed.

Actual Behavior:

The blend animations do not play at all, and there is no visual or console output indicating an error.

I would appreciate any guidance or assistance in resolving this issue. Thank you for your time and support.

@BlockRen BlockRen added the bug Something isn't working label Sep 10, 2024
@BlockRen BlockRen changed the title Animation Control Problem For Blend one in State Machine After Upgrading rive and rive_common Versions Animation Control Problem For Blend One In State Machine (Flutter) Sep 10, 2024
@BlockRen
Copy link
Author

I've identified the core issue: it seems that while timeline animations work fine immediately after initializing the Rive object, blend animations fail to execute unless called after a delay, eg: 1 second. This suggests that blend animations might still be asynchronously initializing after the Rive object is ready, requiring a delayed invocation.

@HayesGordon
Copy link
Contributor

Hi @BlockRen , it'll be helpful if you can share a .rev/.riv file alongside sample code you're using so that we can investigate this more easily.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants