0 votes

When I walk It plays the walk animation that is good, but sprint is a combination of the shift key and the wasd keys but it messes up because it cant decide which one to play I should also say I am using a 3dblend to put the animations together, how would I resolve this issue?

here is pictures for reference.

animation tree: https://pasteall.org/pic/7c7786ade7164de3a716ab830ed55174

animation in code: https://pasteall.org/pic/0c6ee6cd7277484e8746393cefab0044

in Engine by (153 points)

im not sure why but it still doesnt work I indented it like you said so its inside the if statement of wasd but it only plays the idle animation im not sure why it doesnt play the walk animation.

well now im embarassed. i misspelled blend amount.

if Input.is_action_pressed("w") or Input.is_action_pressed("s") or Input.is_action_pressed("a") or Input.is_action_pressed("d"):
    $PlayerMesh.rotation.y = lerp_angle($PlayerMesh.rotation.y, atan2(direction.x, direction.z), delta * anguler_accleration)
    if !Input.is_action_pressed("sprint"):
        $AnimationTree.set("parameters/Blend3/blend_amount",0)

sorry :D

and if that dosent do it, then heres the entire script.
https://pasteall.org/nnDQ

Thanks so much that did the trick, funny a simple spelling mistake and the engine didn't complain it was giving a null output, that is very unusual!

You should also press the answer button so people can find out what the issue was, thanks again! you did great on helping me through this!

1 Answer

+1 vote
Best answer

Answered in the comments.

by (100 points)
selected by
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.