Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • 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 /
  • Help Room /
avatar image
0
Question by SeRasul · May 12, 2016 at 11:24 AM · c#animationhow-to

Animation,God!

I am new in Unity. Learn it for 2 weeks. I am sorry about my English, I am still learning. So... Please someone tell me how to switch animation for my character when I pressed buttons(WASD or another, just for some action). I am creating third person game. I have watched lots of videos about animation controller. I made all things what they has shown and told me, but it do NOT work. Example code what I have written:


void Update(){ if(Input.GetKey("w")){anim.Play("WALK");} or float h = Input.getaxis("Horizontal"); flaot v = Input.getaxis("Vertical"); //BlendTree was created anim.SetFloat("speed",true);// 0 is walkstate,1 is runstate
}
first option work but not clear. I have some fast leaps. Please, if you can, just give working code or explain how I can fix it or explain how I can find information for selfhelp. Notes: when I pressed some button - animation go, released - stop. Oh, it will be nice if IT AUTOPLAYING WHEN COMES TO END!!!!NOT JUST STOP AT LAST FRAME AS STATUE!!!! thank you for attention. I hope some understand my pain and can help)))

Comment
Add comment · Show 1
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 HarshadK · May 12, 2016 at 11:25 AM 0
Share

Please format your code.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by UsmanAbbasi · May 12, 2016 at 11:39 AM

If you are new you should watch this official Unity training video to learn about animation. It is long but it is worth it.

https://unity3d.com/learn/tutorials/modules/intermediate/live-training-archive/setting-up-a-humanoid-avatar

Beginner Tip: Always use unity live trainings or tutorials from unity site to learn something new in Unity, if it does not help then go for other tutorials.

Comment
Add comment · Show 1 · 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
avatar image SeRasul · May 12, 2016 at 02:41 PM 0
Share

Thanks for help and attention)

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.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

The name animator does not exist in the current context... Help? 1 Answer

Play animation on mouse click 1 Answer

Animation play not working C# 0 Answers

Check if the player is off/on the path. (3D; c#) 1 Answer

Trying to animate using Breadcrumb(Asset) 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