Page 1 of 1

Changing the speed of an animation with DS

Posted: Fri Jun 18, 2021 9:59 am
by lostmushroom
I've been reading the documentation on using DS with the animator but haven't found quite what I'm looking for. Is there a way to change the speed of an animation that's currently playing using the sequence field?

I have a scrolling background that sometimes needs to be "paused". So I'm wondering if there's a way to set the speed to 0 in one dialogue node, then back to 1 in the next.

Re: Changing the speed of an animation with DS

Posted: Fri Jun 18, 2021 11:31 am
by Tony Li
Hi,

You could use a blend tree for the scrolling background animator state. Blend on a float parameter, where 0 is stopped and 1 is scrolling:

scrollSpeed.png
scrollSpeed.png (43.75 KiB) Viewed 306 times

Then use the AnimatorFloat() sequencer command to set the float parameter.

Re: Changing the speed of an animation with DS

Posted: Fri Jun 18, 2021 11:55 am
by lostmushroom
I totally forgot Blend Trees were a thing. Thanks Tony!

Re: Changing the speed of an animation with DS

Posted: Fri Jun 18, 2021 1:05 pm
by Tony Li
Glad to help! :-)