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
5
Question by ckeaney · Aug 28, 2015 at 06:45 PM · animationtutorials

Survival Shooter Tutorial - Player Animation Not Playing Correctly

I'm on video #2 of the survival shooter tutorial, using Unity v5.1.2 on OSX Yosemite 10.10.3.

I've completed the PlayerAC animator controller and the PlayerMovement script per the tutorial.

When I hit play to test, the player moves and follows the mouse pointer as expected, but the animations are incorrect. For example, the 'Move' animation is only showing the gun moving (while the original that came with what I imported is showing footsteps), and the 'Idle' animation does not show anything (while the original shows yawning and what not).

I tried recreating the 'PlayerAC' animator controller, and could see the animations working fine within the animator up until I attached it to the player object. I also tried attaching the animator from the '_CompletedAssets' folder, and the same thing occurred (the animations appeared to be working fine until they were attached to the player object).

I'm not seeing any issues come up in the console, and I'm not seeing anything about this online. Anyone out there have any thoughts?

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

10 Replies

· Add your reply
  • Sort: 
avatar image
6

Answer by efreethy · Oct 22, 2016 at 08:00 PM

Expanding on @lvrodrgues 's response, he is correct, the solution can be found here: http://forum.unity3d.com/threads/survival-shooter-tutorial-part-2-error.308208/

Here is the text solution, as posted by @Socrates:


Open the Animator Controller. In the Animator window, select the Transition from Idle to Move. In the Inspector, uncheck "Has Exit Time". This prevents the rest of the animation loop from playing before you transition to the next animation.


This makes sense actually, if you don't give the animation any time to complete before triggering the next animation, the player will go from idle -> to walking -> back to idle almost instantaneously because Input.GetAxisRaw from the PlayerMovementScript is feeding either 0 or 1;

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
avatar image
2

Answer by JehtBlack · Oct 27, 2015 at 11:41 PM

I had the same issue, I found that I had ended up with an animator component on both the player game objects in the hierarchy, having one on both caused the player model to fail to animate while gun continued to animate, removing the animator from the model fixed the issue.

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 o3bor · Oct 28, 2015 at 08:39 AM 0
Share

Thank you JehtBlack, it worked like a charm!

avatar image Sathyamurthy · Apr 12, 2016 at 12:53 PM 2
Share

Go to the transition between IDLE and $$anonymous$$OVE and un-check exit time. It works perfectly for me.

avatar image AdiyogiAZX Sathyamurthy · Aug 04, 2016 at 11:23 AM 0
Share

Thank you #sathyamurthy it's working perfectly.

avatar image
1

Answer by lvrodrgues · Jan 07, 2016 at 11:46 AM

Hi. Founded solution in http://forum.unity3d.com/threads/survival-shooter-tutorial-part-2-error.308208/

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
avatar image
0

Answer by ckeaney · Aug 30, 2015 at 01:56 PM

Update:

I still have the same issue, but I've tried and ruled out a couple more things.

1) The 'Player' pre-fab under completed assets that came with the tutorial works as expected when dropped into the scene.

2) I took the script that I wrote for 'PlayerMovement' and applied it to the working pre-fab above, and it continued to work as expected. So I can rule out an issue with my script.

I compared the completed pre-fab asset to the one I had set up, and made sure every setting, as well as the order of all the components was the same, to no avail.

Is it possible this is just a bug within the tutorial?

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
avatar image
0

Answer by steambucky · Sep 26, 2015 at 01:35 AM

@ckeaney - I'm having the same issue. Did you find a solution?

Comment
Add comment · Show 4 · 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 steambucky · Sep 26, 2015 at 02:59 AM 0
Share

@ckeaney - I fixed this by going to the transition between IDLE and $$anonymous$$OVE and un-ticking exit time.

I am guessing that exit time allows your to finish your animation state before transitioning to the next state rather than just cutting to it straight away. We want the animation to play straight away.

Hope that helps. Only took me an hour to work that out....:) ( I better get use to that....)

avatar image ckeaney steambucky · Sep 26, 2015 at 01:24 PM 0
Share

So unfortunately, I didn't have exit time checked on any of the transitions and was still experiencing the issue.

I ended up forging forward with the completed pre-fab asset ins$$anonymous$$d to get through the rest of the tutorial (which created a few other complications down the line which I had to sort out).

Glad it worked out for you and appreciate the response and follow up!

avatar image punkrooks · Apr 15, 2016 at 05:54 AM 0
Share

Thanks.. It worked..

avatar image punkrooks · Apr 15, 2016 at 05:58 AM 0
Share

Hey,i have a problem, i hope you would reply soon. I am new to unity, that exit time unchecked work, now my problem is my player doesn't gets hurt after adding enemy attack and player health script, or i can say player health bar doesn't decreases when the enemy attack or comes near But... But.. When i simply built and run, on playing outside unity it worked. That health bar responded and the player health also worked as it should be. So. $$anonymous$$y question is why isn't this working inside the unity editor

  • 1
  • 2
  • ›

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

38 People are following this question.

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

Related Questions

Animation using Mecanim tutorials 0 Answers

Animator is not playing an AnimatorController 8 Answers

What are some good tutorials/programs for animating? 2 Answers

Animation Control by Float 2 Answers

Problem of trancicion of states with the anystate, mecanim 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