+1 vote

I've got a sprite with a walking animation in 8 directions. I'd like to change the speeds of all 8 animations based on the velocity of the sprite. To keep it from having that sliding effect.

I found that you can use a blendtree and appliy a timescale, but I can't get it to work. Do I add this in parallel to the walk node or in between the idle node and the walk node, plus I'd like to apply it to all 8 animations at once.
https://github.com/godotengine/godot-proposals/issues/463#issuecomment-585551999

Here's the bit of script I used to change the timescale:
animationTree["parameters/WalkSpeed/TimeScale/scale"] = 3

I can see in the remote inspector that it does get set to 3, but I don't see a change in the animation speed.

in Engine by (15 points)

1 Answer

–1 vote

if you're working in 2d don't even bother with animationtrees, the standard animation sprite had a property called "speed scale" that should work just fine

by (253 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.