Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 /
avatar image
0
Question by Ben 20 · Jan 05, 2011 at 03:00 AM · animationkeypresskeys

I'm having animation problems

I can't seem to get animations to play in Unity. This is the workflow that I used.

-Character modeled in 3ds Max 7 and is rigged with biped and uses skin.

-I downloaded 3 biped files (walk, run, standby) and applied them to the character model

-I exported the character as a .fbx file using 3ds max 2011 using default export settings

-I edited the animation so it was facing the correct direction and would walk in place in Motionbuilder 2011

-I then added the model to my Unity assets

-I set frames 0 - 32 as "walk" and 50 - 90 as "idle" and set both of their WrapModes to "loop" and left everything else the same

-I deselected the "Play Automatically" checkbox

-Then I added the following script to the character

//Taken from //http://unity3d.com/support/documentation/Manual/Animation%20Scripting.html

function Update () {

if (Input.GetAxis("Vertical") > 0.2)

   animation.CrossFade ("walk");

else

  animation.CrossFade ("idle");

}

Now when I click play nothing happens. I can push the arrow keys and WASD keys and nothing happens. When I check "Play Automatically" The walk animation plays on a loop without any keys being pressed, and pressing keys does nothing. I've tried multiple things, but can't seem to get it right. Anyone have any suggestions?

Comment
Add comment · Show 2
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 Paulius-Liekis · Jan 05, 2011 at 10:27 AM 0
Share

I can't really see anything wrong with what you told. Try putting some Debug.Log in your code to make sure it is executed. Or post your project here - maybe someone will figure out.

avatar image uhahaha · Jan 05, 2011 at 01:26 PM 0
Share

Post the whole script not the snippet for us to see which part causes the problem.

0 Replies

· Add your reply
  • Sort: 

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

No one has followed this question yet.

Related Questions

animations not working correctly in build 1 Answer

How to make player attack animation play through without holding down a key. 0 Answers

Play Animation on keypress? 2 Answers

Basic animation key press 0 Answers

Playing animations on different game objects with the same key press 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