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 AndreiMarian · Aug 03, 2017 at 06:20 PM · animationanimatoranimator controller

Confused at triggering a simple animation

I read the manual, watched a couple of tutorials read on the forums but I don't get how a simple animation is supposed to be triggered. I have an object which for 99% of the time isn't animated but for a short moment it needs to shake a little.
I made an Animator Controller and an Animation. I dragged the animation into the controller as a state. This is where it gets fuzzy.
There's an Entry and Any State states and the my clip gets automatically linked to Entry.
I want the clip to run when a trigger is true, NOT automatically at start.
Possible solution:
All I need is Any State transitioned to my animation. So I thought I should make a dummy state to "lure" Entry into, so to shake the transition off my animation, since apparently I can't delete the transition from Entry to my animation. But I don't think this is the right way to do, but more of a ghetto workaround.
What's the right way, I'm asking?

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
1
Best Answer

Answer by FortisVenaliter · Aug 03, 2017 at 08:40 PM

An animator controller can't have "no state".

You need an "idle" animation for when it's not shaking. Have it go from entry to looping idle. When the trigger happens, it can transition to the shake animation, play once, and then go back to idle.

Comment
Add comment · Show 2 · 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 AndreiMarian · Aug 03, 2017 at 09:03 PM 0
Share

Then perhaps it's better to use the legacy animation? But I'm trying to stay away as it'll probably be deprecated/taken out. $$anonymous$$y scenario merely implies something like "if input, then play the (only) animation".
I wouldn't need the whole complexity of the animator controller with states, transitions, parameters and what not. After all, the Animator looks like it's been re-thought as a fully fledged state machine rather than an animation-player.

avatar image FortisVenaliter AndreiMarian · Aug 03, 2017 at 09:14 PM 1
Share

Correct, but a two-state machine would have little overhead. And the idle animation can have zero keyframes, which would have zero overhead, so it's still probably the cleanest solution.

avatar image
0

Answer by a161803398874 · Aug 03, 2017 at 09:34 PM

check this thread on how to trigger an animation http://answers.unity3d.com/questions/1386713/animator-and-scripting-problems-help.html?childToView=1388007#answer-1388007

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 AndreiMarian · Aug 03, 2017 at 09:51 PM 0
Share

This has nothing to do with my case. That's in general how to normally use the Animator with animations.

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

172 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

Related Questions

How to handle multiple animation variants 1 Answer

Display additional animation on top of other animations 0 Answers

Animator Override Controller changed at runtime doesn't always play the animations correctly 1 Answer

Attempting to change AnimatorController during Runtime 0 Answers

Set the time of an animation keyframe per script? 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