Hello there,
I am working with spine animation and would like to slow them down, like play at half the speed, I checked the api reference for spine API reference (spine) but I couldn’t find a property that suits what I need, any recommendations ?
Yeah, it seems the documentation needs an upgrade.
The spine component has a “cursor” property, that is in the range [0.0, 1.0]
Perhaps:
go.set(url, “cursor”, 0.5)
But that would only set the animation to halfway from start to finish. It wouldn’t change the animation speed. Although I guess you could animate it using go.animate()?
local duration = 3
go.set(url, "cursor", 0.0)
go.animate(url, "cursor", go.PLAYBACK_ONCE_FORWARD, 1.0, go.EASING_LINEAR, duration)
This doesn’t play the animation at a fraction of the original speed (eg half the speed), but rather sets the animation duration to an absolute time, in this case 3 seconds.
Yes, sorry, I got side tracked.
The property name is ofc “playback_rate”
Ah, I was looking for that in the manual!
I’m currently updating the script api as we speak
Ok, it’s here:
So basically, spine.play_anim is just a wrapper for this and if we want any editing on how fast it plays we should use the “cursor” property, correct ?
No, you should use “playback_rate”. Sorry for the confusion above!
Could you please write a code sample just to clear this confusion out ?
go.set(url, “playback_rate”, 0.5)