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 Dainiusss · Feb 12, 2015 at 03:29 PM · animation2dspriteplayreverse

How to play an animation in reverse?

Hello! I wanted to ask, how can I play an animation in reverse in my animator? When my object is on the ground, it's doing idle animation, when it starts flying, it does animation1 without looping (to change children sprites positions). When it does the transition from idle to animation1, it does it perfectly, but when it does it in reverse (to go back to idle), it ignores all keyframes and curves and just moves all sprites to the idle position (it does not change them instantly, it just ignores keyframes and curves, goes in straight line). So, how can I play my animation in reverse? Is there a way to do it without code, maybe?

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

1 Reply

· Add your reply
  • Sort: 
avatar image
3

Answer by smoggach · Feb 12, 2015 at 04:02 PM

Set the time Speed of the mecanim state to -1 and it will play reversed.

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 Dainiusss · Feb 12, 2015 at 06:15 PM 0
Share

Yeah, but if I set my animation speed to -1, my animation does not even start when it should, I need an animation to be reversed only when back transition is made. Should I do that by code? Thanks

avatar image smoggach · Feb 12, 2015 at 06:20 PM 1
Share

Very hard to understand your english. Here is an example of what I mean:

State 1: $$anonymous$$otion: your_animation Speed: 1

State 2: $$anonymous$$otion: your_animation Speed: -1

If you've already got it that way then the problem is probably in your transition to the reversed anim. It's not really ignoring your curves it's blending them because the transition takes the entire length of the animation.

avatar image Dainiusss · Feb 12, 2015 at 06:36 PM 2
Share

Ok, now I got it. I did it in that way... I don't know if there is a smarter way, but anyways, this works:

alt text

Thank you very much for your help and sorry for my bad english, I am sleepy today and have a headache...

controller.png (10.9 kB)

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

20 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

Related Questions

Customizable characters with sprites in 2d 0 Answers

Help With Animation Play Back - Reverse 1 Answer

Animated Overlay Armor Sprite 1 Answer

Best Practices on 2D Animation? 1 Answer

What's the best art pipeline for 2D animated sprites? 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