Rive State Machine broke
Hello,
I went to test the Rive and made an animation to see how it works, here is it in action:
https://www.dropbox.com/scl/fi/x2q8ntzq ... 17vpk&dl=0
As you can see it works nicely, spins up, keeps spinning while you hover, then spins down on hover exit.
Then I went back to Rive app to make it faster, exported again and the state machine / file stopped working correctly:
https://www.dropbox.com/scl/fi/ojh28cux ... fp0if&dl=0
For comparison this is from Rive app where it works as it should:
https://www.dropbox.com/scl/fi/65khllo0 ... rto6e&dl=0
I tried fiddling in Rive app to see where exactly it went wrong but had no luck. I only have .riv files at this point, so I attached them both if it helps.
Thanks for taking a look.
I went to test the Rive and made an animation to see how it works, here is it in action:
https://www.dropbox.com/scl/fi/x2q8ntzq ... 17vpk&dl=0
As you can see it works nicely, spins up, keeps spinning while you hover, then spins down on hover exit.
Then I went back to Rive app to make it faster, exported again and the state machine / file stopped working correctly:
https://www.dropbox.com/scl/fi/ojh28cux ... fp0if&dl=0
For comparison this is from Rive app where it works as it should:
https://www.dropbox.com/scl/fi/65khllo0 ... rto6e&dl=0
I tried fiddling in Rive app to see where exactly it went wrong but had no luck. I only have .riv files at this point, so I attached them both if it helps.
Thanks for taking a look.
- Attachments
-
- RiveFiles.zip
- (2.08 KiB) Downloaded 16 times
Re: Rive State Machine broke
Aha I found I can post it to community if you need the check how its made: https://rive.app/community/7388-14194-spinning-reel/
-
sfernandez
Site Admin
- Posts: 2997
- Joined:
Re: Rive State Machine broke
This doesn't look like a Noesis problem but a question of how to use Rive itself, right?
Is the the state machine working as expected in the Rive editor? If not you should probably ask in their community forums about what could be happening.
Is the the state machine working as expected in the Rive editor? If not you should probably ask in their community forums about what could be happening.
Re: Rive State Machine broke
It works fine in Rive thou, its recorded in the third link in the original post and if you check the second link you can see how it behaves in unity.
-
sfernandez
Site Admin
- Posts: 2997
- Joined:
Re: Rive State Machine broke
I've opened the https://rive.app/community/7388-14194-spinning-reel/ link in the Rive editor and I don't see any Listeners set up for updating the Hover input variable.
It works if you manually change the Hover input value in the editor, but not if you move your mouse over the artboard (it doesn't work either in the Rive Community webpage linked). I think you are missing those listeners (they probably got deleted when you modified the rive and exported it again).
It works if you manually change the Hover input value in the editor, but not if you move your mouse over the artboard (it doesn't work either in the Rive Community webpage linked). I think you are missing those listeners (they probably got deleted when you modified the rive and exported it again).
Re: Rive State Machine broke
Hello, I am not using listeners, I trigger hover in xaml:
and then change Tag:
I went and recreated the file so it worked again, then I noticed what I changed and it is the curve weights, if you change the handles from Cubic to Cubic Handles first problem appears, the easing issue, since on Cubic Handles it treats it as linear.
Still didn't manage to "break" the State Manager like the first time...
So to recap, this is fine:
. .
And this is not (result is linear whatever you set the handles):
. .
I will try to mess it with more to see what triggers the state machine issue.
Here is the working file, you can double check its identical setup as first one: https://rive.app/community/7476-14363-spinning-reel-v2
And it works fine if you use it like the code I pasted above.
Code: Select all
<noesis:RiveControl x:Name="rive"
Width="16"
Height="16"
Source="{TemplateBinding noesis:RiveControl.Source}"
Stretch="Uniform"
Tag="0">
<noesis:RiveInput InputName="Hover"
InputValue="{Binding Tag, ElementName=rive}" />
</noesis:RiveControl>
Code: Select all
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="rive" Property="Tag" Value="1" />
Still didn't manage to "break" the State Manager like the first time...
So to recap, this is fine:
. .
And this is not (result is linear whatever you set the handles):
. .
I will try to mess it with more to see what triggers the state machine issue.
Here is the working file, you can double check its identical setup as first one: https://rive.app/community/7476-14363-spinning-reel-v2
And it works fine if you use it like the code I pasted above.
Re: Rive State Machine broke
Thanks for the details, I think this is happening because 3.2.2 is using a year-old Rive runtime. We have updated to a recent version in 3.2.3. Please, try it once this version is released.
Who is online
Users browsing this forum: No registered users and 4 guests