• 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
0
Question by hugemaggot · Dec 13, 2010 at 08:36 PM · animationblenderrpg

how do I make my character walk?

i want to make an rpg with unity but i dont know how to make my character walk. ive already made my character with a run, walk and idle animation with blender and imported it into unity. but i dont know how to make my character do his animation when i press the buttons on my keyboard. all i know is that its somehow done with scripting, and im hopeless at scripting. so can anyone write me a script or tell me how i would do this?

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 shane_123 · Nov 29, 2015 at 01:35 AM 0
Share

https://www.youtube.com/watch?v=fQo3lqJBgF$$anonymous$$

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by skovacs1 · Dec 13, 2010 at 08:53 PM

Check out the tutorials. Read and understand what they are doing. They have scripts that do exactly what you are trying to do. Unless you are paying them to do so, you would be hard-pressed to find someone willing to do all the work for you.

Simple code is something along the lines of:

function Update() {
    var v = Input.GetAxis("Vertical");
    if(Mathf.Abs(v) > 0.1f) {
        animation["Walk"].speed = v;
        animation.CrossFade("Walk");
        transform.position.z += v;
    }
    else animation.CrossFade("Idle");
}
Comment
Add comment · Show 3 · 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 hugemaggot · Dec 13, 2010 at 09:16 PM 0
Share

i dont understand the tutorial of lerpz which is the only one that covers animating a character im taking A STRESS HERE $$anonymous$$AN ARRRR!!!!! ive been trying to do this for about a week now and im no where closer than where i started please i need help!!!!!!!

avatar image skovacs1 · Dec 13, 2010 at 09:29 PM 0
Share

If you don't understand the tutorials, rather than shouting and pestering people to do everything for you, try asking about the specific part of the tutorial that is giving you so much grief. $$anonymous$$ost of the tutorials have scripts called somethingOrOtherAnimation which do pretty much exactly what I've posted. They have some somethingOrOtherController which sets a variable is$$anonymous$$oving to true when $$anonymous$$athf.Abs(something) > 0.1f and then in the somethingOrOtherAnimation, they check somethingOrOtherController.is$$anonymous$$oving and play the appropriate animation. The 2D platformer tutorial is simplest - start there.

avatar image hugemaggot · Dec 14, 2010 at 07:52 AM 0
Share

im sorry for shouting im was just really angry, sorry again.

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

2 People are following this question.

avatar image avatar image

Related Questions

animation blender to unity problem 0 Answers

How can i put multiple animations on one object in blender? 1 Answer

Unity importing model error animation(fbx) 2 Answers

Unity: FBX export different animations 0 Answers

Playing a axe swing animation from blender 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