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
0
Question by Maria Chernykh · Oct 15, 2013 at 12:34 PM · animationmecanimtransitionblending

Mecanim clips transition options

Hi there, I'm using Mecanim in Unity 4.1.2f1. I have one animation clip for running forward. I want to make running backward also using this clip by setting it's speed to -1 (it looks ok).

To make perfect transition between these clips I need to fulfil the following: if at the moment of transition we have the normalized time of running forward clip equal to (1/n) then we must transit to normalized time of running backward equal to (1 - 1/n) (and vice versa).

Can I somehow realize this scenario by means of Unity Editor or is the only way to do it is setting normalized time from script?

Comment
Add comment · Show 6
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 infinitypbr · Oct 17, 2013 at 07:54 PM 1
Share

You may be overthinking it. Are you able to make the backwards-running clip a separate animation? If so, then you have two animations and mecanim will blend them together, with I assume an idle clip.

I may be confused as to what you're asking, however. But if the transition is so fast, like the character is running forward and then almost instantly starts running backward, then no amount of blending will make it look THAT perfect, since blending requires time.

avatar image Maria Chernykh · Oct 18, 2013 at 09:38 AM 0
Share

Thank you for your answer.

Yes, transition need to be almost momentary. I really don't need real blend in this situation. But I don't know how I can realize the described above scenario, so I thought mabe transition options allow to make this.

Do you know any way of implementing this kind of transition? $$anonymous$$aybe by scripting?

Thanks in advance...

avatar image Maria Chernykh · Oct 18, 2013 at 09:44 AM 0
Share

I've attempted to use animator.ForceStateNormalizedTime() but it did not help a lot because is can be used only for setting normalized time of a state, but to reach the state we must make transition to it first. And even if transition is adjusted to by very short in editor it still transfers us to fixed frame (as was set in it's settings).

avatar image infinitypbr · Oct 18, 2013 at 06:02 PM 0
Share

Well, $$anonymous$$ecanim should do all that work for you. If you pass a variable, such as "velocity" to mecanim, and set "run forward" to +1 and "run backward" to -1 (with "idle" at 0), then make sure that when the player is pressing "up" or what not, velocity = 1 and when they're pressing "down" (or "back" or however you set up your controls) then velocity = -1, mecanim will take care of the rest.

avatar image whydoidoit · Oct 18, 2013 at 11:07 PM 0
Share

I'm figuring you want immediate reverse with the foot placement exactly the same right? Can't you have a non-atomic, zero length blend with ForceStateNormalizedTime?

(Thinking that non-atomic blends do not enforce a particular frame)

Show more comments

0 Replies

· Add your reply
  • Sort: 

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

16 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

Related Questions

Mecanim mysterious curve 2 Answers

Unity 5.2: Mecanim Transition Blending 1 Answer

Combining two animations to be one 0 Answers

Mecanim Root Motion Rotation - 180 degree turn. 2 Answers

Mecanim transition between animation help 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