- Home /
Hello! I have some issues with animations.
Hello again! I'm stuck in a tricky situation as I do not know what I should do to make my player animate walking backwards instead of going into idle, and how I can make him do the sprint animation when pressing LSHIFT instead of using the walking animation?
I currently have idle, strafe left and right, walking and jump animation working as they should.
Any help would be appreciated. If there is any misunderstanding or anything confusing, let me know and I'll do my best to explain further!
Add two parameters to the Animation blend tree. float speed and bool isRunning. If the former is below 0, transition to the moving backwards animation. If shift is pressed, set isRunning to true and transition to the runnign animation ins$$anonymous$$d of walking. Both speed and isRunning would be set in your script via Animator.SetFloat/SetBool when appropriate.
Hi Cherno. Thanks for taking your time to help me! I got both the backwards animation and running animation working but they won't stop loop?
Example:
You stop moving when going backwards, it keeps looping the animation.
When you hold LSHIFT the character starts running but he does it in a very weird behaviour (he doesn't complete the full loop).
Also, how can I make him only do the sprint animation when actually walking?
To stop a clip from looping, you have to uncheck Loop in the clip's impot settings.
I advise you to read the User $$anonymous$$anual for the Animator component as well as Animation States, transitions etc. It's hard to tell what's going wrong without the blend tree.
Rep to all of you guys. I got it to about 99.9% working! Sorry for the late answer.
in the Animator controller when you are changing between trees, select the arrow between the trees and set the animation as really want (how it will change from one animation to other, how'd it take and the behavior while it's changing)
Answer by TX Manager · Apr 02, 2016 at 10:15 PM
in the Animator controller when you are changing between trees, select the arrow between the trees and set the animation as really want (how it will change from one animation to other, how'd it take and the behavior while it's changing)
Your answer
Follow this Question
Related Questions
How to trigger the same animator state in unity5 with script? 2 Answers
What is the proper way to wait for an Animator Controller to update? 1 Answer
My animations are messed up 1 Answer
How do I override an animation in animator? 0 Answers
Is there a new retargetting system for the animation in 5.5? 1 Answer