You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Regression in AnyState Transition: setNumberState + fireState Misbehaves in 9.13.8 (Works in 9.12.2)
Description
We are using the official Rive Android Runtime API to update a state machine’s inputs by calling setNumberState immediately followed by fireState to trigger transitions from AnyState. In Rive.app’s preview, this approach reliably produces the expected state transitions (e.g. switching between different facial expressions). However, in Android Runtime 9.13.8 the following issue occurs:
When calling fireState immediately after setNumberState, the state machine transitions from AnyState to a specific state (e.g. "particle1" or "changeEye-idle") only once, and subsequent state updates fail to occur.
In contrast, downgrading to version 9.12.2 results in the expected behavior, with each trigger causing the correct state transition and corresponding animation.
Provide a Repro
Please use the minimal reproduction steps below:
In your Rive file, create a state machine that uses a numeric input (e.g. facialExpressionSelector) and a trigger input (e.g. facialExpressionTrigger) to set up transitions from AnyState to specific states.
In your Android app, implement a function similar to the one below to change the facial expression:
funsetFacialExpression(
riveView:RiveAnimationView,
machineName:String,
expression:FacialExpression
) {
// Update the numeric input
riveView.setNumberState(machineName, "facialExpressionSelector", expression.intValue.toFloat())
// Immediately fire the trigger
riveView.fireState(machineName, "facialExpressionTrigger")
}
Invoke this function from each facial expression button’s onClick handler.
Source .riv/.rev file
RIV
credit : CC-BY, Remix from Ryuhei's work Origin
Expected behavior
The expected behavior is that, as in Rive.app’s preview, calling fireState immediately after setNumberState reliably triggers the correct transition from AnyState to the intended state (corresponding to each facial expression) and plays the appropriate animation.
Screenshots
Device & Versions (please complete the following information)
Device: Jerry Star
SDK Level: Android 13, API 33
Rive Android Runtime:
9.13.8 – Issue present
9.12.2 – Works as expected
Additional context
According to the official Rive documentation and GitHub source code, the methods setNumberState and fireState are designed to support transitions from AnyState properly.
Starting with version 9.13.7, improvements were made to trigger evaluation (processing triggers reliably per layer). However, in version 9.13.8, using this approach causes the state machine to transition to an incorrect state (e.g. "particle1" or "changeEye-idle") only once, and no further state updates occur. This regression is not observed in version 9.12.2, where the expected state transitions and animations are triggered reliably with each call.
Thanks
The text was updated successfully, but these errors were encountered:
Title
Regression in AnyState Transition: setNumberState + fireState Misbehaves in 9.13.8 (Works in 9.12.2)
Description
We are using the official Rive Android Runtime API to update a state machine’s inputs by calling
setNumberState
immediately followed byfireState
to trigger transitions from AnyState. In Rive.app’s preview, this approach reliably produces the expected state transitions (e.g. switching between different facial expressions). However, in Android Runtime 9.13.8 the following issue occurs:fireState
immediately aftersetNumberState
, the state machine transitions from AnyState to a specific state (e.g."particle1"
or"changeEye-idle"
) only once, and subsequent state updates fail to occur.Provide a Repro
Please use the minimal reproduction steps below:
facialExpressionSelector
) and a trigger input (e.g.facialExpressionTrigger
) to set up transitions from AnyState to specific states.onClick
handler.Source
.riv
/.rev
fileRIV
credit : CC-BY, Remix from Ryuhei's work
Origin
Expected behavior
The expected behavior is that, as in Rive.app’s preview, calling
fireState
immediately aftersetNumberState
reliably triggers the correct transition from AnyState to the intended state (corresponding to each facial expression) and plays the appropriate animation.Screenshots
Device & Versions (please complete the following information)
Additional context
According to the official Rive documentation and GitHub source code, the methods
setNumberState
andfireState
are designed to support transitions from AnyState properly.Starting with version 9.13.7, improvements were made to trigger evaluation (processing triggers reliably per layer). However, in version 9.13.8, using this approach causes the state machine to transition to an incorrect state (e.g.
"particle1"
or"changeEye-idle"
) only once, and no further state updates occur. This regression is not observed in version 9.12.2, where the expected state transitions and animations are triggered reliably with each call.Thanks
The text was updated successfully, but these errors were encountered: