• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
Question by $$anonymous$$ · Apr 02, 2016 at 04:57 AM · c#animationunity 5animatoranimator controller

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 $$anonymous$$m 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 anyt$$anonymous$$ng confusing, let me know and I'll do my best to explain further!

Comment

People who like this

0 Show 6
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Cherno · Apr 02, 2016 at 11:11 AM 1
Share

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 instead of walking. Both speed and isRunning would be set in your script via Animator.SetFloat/SetBool when appropriate.

avatar image $$anonymous$$ Cherno · Apr 02, 2016 at 07:44 PM 0
Share

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?

avatar image Cherno $$anonymous$$ · Apr 02, 2016 at 08:37 PM 1
Share

To stop a clip from looping, you have to uncheck Loop in the clip's impot settings.

I advise you to read the User Manual for the Animator component as well as Animation States, transitions etc. It's hard to tell what's going wrong without the blend tree.

Show more comments
avatar image $$anonymous$$ Cherno · Apr 05, 2016 at 03:38 PM 0
Share

Rep to all of you guys. I got it to about 99.9% working! Sorry for the late answer.

avatar image TX Manager · Apr 02, 2016 at 08:20 PM 0
Share

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)

1 Reply

· Add your reply
  • Sort: 
avatar image

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 w$$anonymous$$le it's changing)

Comment

People who like this

0 Show 0 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Cant get Animator Controller to work properly 2 Answers

How do i use the animator avatar mask to combine two animations ? 0 Answers

Help with animator controllers 1 Answer

Animation plays one frame then freezes on that first frame. 0 Answers

What would be the best way to do something based on the animation state of the character? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges