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 kamal_p_99 · Jan 07, 2018 at 09:03 AM · animationanimationsanimationclipclips

Unity Animator cant play the same animation twice.

Hello Everyone

Im using the Unity Animator component to move a simple tank around a grid like enviroment. I have animationsfor turining right, left, moving upwards, and rotating downwards 180 degrees and moving downwards.

When I play any of these animations they work once, but if I play the same animation once after another ( even after a brief period of time) the animation doesn't play. When I play a different animation and then play the first animation again it works. This doesn't make sense to me.

   public void initiateTankMove()
     {
 
         
         if (mapReceiver.moveY == "Down")
         {
             animator.Play("Rotate180");
             
         }
         else if (mapReceiver.moveY == "Up")
         {
             animator.Play("MoveUp");
         }
         else if (mapReceiver.moveX == "Left" )
         {
 
             animator.Play("TurnLeft");
         }
         else if (mapReceiver.moveX == "Right")
         {
             
             Debug.Log("Intend to turn right");
             animator.Play("TurnRight");   
         }
     }



Please see below for inspector details for the Animator component. I have select 'Apply root motion' otherwise the tank starts at position 0,0,0 always, i randomly set the position of a tank at the beginning of a game.


alt text


I have also attached a screenshot of one of animation clip details


alt text


Im pretty sure that the code is being entered , as the log message for the 'Right' is played twice, however is doesn't look like the actual animation plays and performs the necessary transform.

Any help on this will be much appreciated.

Thanks

capture.png (14.3 kB)
animator-srn.png (14.7 kB)
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
0

Answer by Grish_tad · Jan 07, 2018 at 10:34 AM

HI @kamal_p_99. In Animator window select transition (arrow between animation nodes) and uncheck "Has Exit Time". alt text

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 kamal_p_99 · Jan 07, 2018 at 02:01 PM 0
Share

Hi @Grish_tad

$$anonymous$$y Animator didn't have any transitions between each separate move. It was able to transition to a different move but not to the same move. I have added a transition from each clip to the waiting state now, as shown below and this seems have fixed the issue:

Thanks

alt text

animation-transitions.png (31.3 kB)
avatar image
0

Answer by yannvasseur · Sep 03, 2020 at 11:35 PM

I had the same issue, and same resolution.

I didn't have any link between animation and orange state. Linking it fixed it.

Tks for the help.,I had the same issue, and same resolution.

I didn't have any link between animation and orange state. Linking it fixed it.

Tks for the help.

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

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

Related Questions

Single Animation file for two different objects! HELP! 1 Answer

Addititive Animation Not Responding to Speed 1 Answer

Does character bones and rigs should be according to mecanim clip ? 0 Answers

Trouble with animation wrap mode-animation plays randomly 1 Answer

I Need The Help Or Advice Of A Unity Animation Expert 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