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 /
avatar image
0
Question by Jonross · May 02, 2010 at 12:10 AM · animation3dwalkcycle

Animation... Unity 3D...Blender...3rd Person

Hello, I have a fully rigged, and animated 3D Model for my 3rd Person game, and, when i import the model into Unity, and play it, setup character controls and camera controls, it does the animation for 3 seconds, then stops and when i press W to move forward, it just glides and does not do the animation, Could someone please give me a script, or code, or something so i can fix that? Thanks!

Here is my Character Control...

Character Control Code

Any help would be very appreciated, thanks!

Comment
Add comment
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

2 Replies

· Add your reply
  • Sort: 
avatar image
3

Answer by Peter G · May 02, 2010 at 01:17 AM

You need to actually call the animation to play.

if(isWalking) { animation.CrossFade("walk"); }

else if (moveDirection != Vector3.zero) { animation.CrossFade("run"); }

else animation.CrossFade("idle");

It also sounds like the loop mode on your animations is off. You probably have the setting on once when it should be on loop. To see the various options for looping click here. Depending on how you imported your animations do the following:

If you created a single animation in Blender and split it in the importer, find the animation in the importer and select loop as your wrap mode.

If you imported your objects using object@animation syntax, then, in the start function of your animation script add:

 animation["walk"].wrapMode = WrapMode.Loop;

This way the animation will keep playing forever instead of reaching the end of the animation and returning to the starting position.

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 Jonross · May 02, 2010 at 01:49 AM 0
Share

Thank you, I added the animation in, but there is one problem, the animation keeps going on after i press "W", even when i've stopped, it wont stop :(

avatar image
2

Answer by Larry-Dietz · May 02, 2010 at 12:42 AM

Looking at your script, it looks like you only have comments saying //invoke walk animation here. etc...

Unless I am missing something, you need to replace those comments with the actual code to play the animation...

Something like...

  gameobject.animation.Play ("walk");

Hope this helps,

-Larry

Comment
Add comment · 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.

Follow this Question

Answers Answers and Comments

No one has followed this question yet.

Related Questions

Changing specific animation of a person 1 Answer

Trouble with animations. 0 Answers

how alternate walk cycle javascript 1 Answer

How Can I Get The Pants to Not Move? 4 Answers

Menu Movements 1 Answer


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