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
1
Question by eivanov · Dec 10, 2014 at 11:01 AM · animator2d animation

Problem with door animation

Hi, I'm trying to make an automatic door but faced a problem with animation. I have a 2d unity proj(attached) with the example. I've created 1 animation for door oppenning and deselect "Loop" checker. Created an Animator with bool parameter "Open" that controls transition and added 2 door oppenning animation to it, one marked as "Mirror" and set up the scene.

But once I test it in game door starts closed ("Open" is set to false by defautl and "Door closed" is a default state in Animator). If player touches circle collider of the door it starts closing but before it's done opens again.

I'm pretty sure that I'm doing something wrong but can't find what excatly:)link text

question_animator.zip (166.7 kB)
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 kdubnz · Dec 10, 2014 at 11:23 AM 0
Share

I don't have time to play at the moment ,but I'm +1 your post because of the zipped project you added. It's a pity more people don't do that to save a swag of assumptions and additional clarification rebuttals.

avatar image MD_Reptile · Dec 10, 2014 at 11:48 AM 0
Share

I've not downloaded the project, but maybe test out just setting the bool true at runtime in the inspector and see what happens. If it works you can rule out the animation state controller you set up. Then start debugging logic... check for conditions that get rapidly called over and over creating a loop of open or closed conditions (like if the trigger is hit maybe it calls open then unintentionally calls close, then open again over and over). Good luck!

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by D3ltaVyyb · Dec 10, 2014 at 01:56 PM

Hello, It's great that you took the time to upload the example. So the problem is that you were trying the mirror boolean. I'm not sure myself how exactly mirror works, but you can uncheck that and instead reverse the animation by setting the speed to -1 on the closed state. In fact you can use a negative speed for any animation you want to reverse.

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 eivanov · Dec 10, 2014 at 02:11 PM 0
Share

Thanks a lot, that helped! BTW, I've checked what's a mirror flag and it seems it just mirrors animation by X axis.

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

How do I change "Any State" on Animator to "Any Other State"? 0 Answers

2D Animation does not start 1 Answer

Shooter 2D: Character animation only runs once 1 Answer

using Animator component on a Prefab, and failed to change transform.localScale 0 Answers

My Anima 2D's flipped animations are bugging out. 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