• 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 awplays49 · Oct 04, 2015 at 11:30 PM · snapsnapping

Leg snapping backwards on one frame in a 2D blend tree

Hello!

I was noticing a problem with my character. For one frame during the forward walk cycle, his leg snaps up like he's kicking his own butt. This is only when my forward variable (between -1 and 1) is set to around 0.6. After that is set to the right amount, he kicks hit butt. Can anyone relate to this issue? How can I fix it?

Animation file:

https://drive.google.com/file/d/0B2ZiQtohl3tmVU85Z09teEcybFU/view?usp=sharing

Comment
Add comment · Show 15
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 meat5000 ♦ · Oct 04, 2015 at 11:38 PM 0
Share

Have you frame for frame synchronised the footsteps in the animations of your blend tree? Usually RiverDance-BandyLeg is caused by badly blending animations.

The other thing that causes this is Not Unturning your limbs in Blender. 360 != 0 degrees .

This means that when you rotate a limb in Blender, if the animation loops back to the start you will end up with the limb, at some point, flicking itself around 360 degrees, so be careful when copy/pasting bone rotations.

In Blender, go frame by frame through your animations. You $$anonymous$$AY find that there is one frame which looks super-weird compared to the rest. $$anonymous$$eep your eyes on the Properties pullout (+ on right hand side of viewport). You may notice that the W factor suddently changes for no good reason.

The left leg lifts higher than the right. If you have mirrored your other anims this may cause an issue.

avatar image awplays49 · Oct 04, 2015 at 11:42 PM 0
Share

@meat5000 I just checked for strange rotations, According to blender I don't seem to have any weird twists. But I uploaded the FBX for texting in Unity.

avatar image meat5000 ♦ awplays49 · Oct 04, 2015 at 11:46 PM 0
Share

You need to watch the numbers in the properties while manually stepping through the animation. If you find nothing there, the trouble is with a bad sync in the BlendTree or possibly not enough keyframes. Unity likes to strip them out and make its own judgement. Check the error values in the Animation Import tab.

And here's something you need to know.

The FPS setting in the Render tab in Blender has a function in Unity. This will decide the actual FPS of your animation. Currently you have it set to 24FPS which is good for a film but not good enough for a game. Set it to 30 or 60.

avatar image awplays49 · Oct 05, 2015 at 12:04 AM 0
Share

@meat5000 I tried turning off animation compression completely and that didn't help.

avatar image meat5000 ♦ awplays49 · Oct 05, 2015 at 12:05 AM 0
Share

Its worth checking when you have these errors.

Do the footsteps of each animation all fall on the same frame?

Show more comments
avatar image awplays49 · Oct 05, 2015 at 12:09 AM 0
Share

@meat5000 I don't use separate layers. I'm using a blend tree in the same layer.

EDIT

Sorry just reread your comment. How can I use layers when the toes are involved in the idle?

avatar image meat5000 ♦ · Oct 05, 2015 at 12:13 AM 0
Share

Only Blend Like animations.

Only place anims with footsteps in the same tree. For example, run walk, turn left, turn right. The steps must fall in the same frames.

For other things which WILL still affect the bones, use separate layers to control their influence. An idle anim will still interfere with a walking stride.

avatar image awplays49 · Oct 05, 2015 at 12:16 AM 0
Share

@meat5000 I understand now, but now how will I "slightly" walk?

avatar image meat5000 ♦ · Oct 05, 2015 at 12:18 AM 0
Share

Reduce the speed of the layer.

Here's how I do it.

http://answers.unity3d.com/questions/764030/walkrun-right-animations-seem-hard-to-come-by.html

avatar image awplays49 · Oct 05, 2015 at 12:29 AM 0
Share

@meat5000 just to clarify, what exactly do you mean by the layer speed? Sorry to be such a noob but where do I find that?

avatar image meat5000 ♦ · Oct 05, 2015 at 12:33 AM 0
Share

You can set that in code if you need. You cant change individual clip speed but you can change the speed of a whole layer.

Notice in my tree how 1 param is for speed, 1 for turning.

3 lines of code to control the whole thing.

To only use parts of the rig at a time, create a Body$$anonymous$$ask.

avatar image awplays49 · Oct 05, 2015 at 12:44 AM 0
Share

But @meat5000 I need my 2 variables for forward and right. What is an alternative solution for this?

avatar image meat5000 ♦ · Oct 05, 2015 at 12:50 AM 0
Share

You will make it work whichever way you choose to do it. I still think the problem lies in Blender. P$$anonymous$$ the .Blend if you like. This QA is getting lengthy.

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

29 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

Related Questions

how to snap objects by colliders2D ? 1 Answer

Snap to grid edge midpoints? 1 Answer

Camera animation issue 0 Answers

Vertex Snapping Produces Gaps 0 Answers

Snap object to grid with offset? 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