• 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 eugeny · Nov 25, 2012 at 03:06 PM · mecanim

Use mecanim to animate basing on delta movement

In every example from Mecanim Examples, actual movement amount is determined from the animation files (i.e. feet movement in them). Can we somehow force Mecanim to choose animation based on the movement speed/direction, and perform movement ourselves? I think Mecanim should do IK solution to keep feet on ground, based on supplied delta movement. This is crucial to networked games, where you only have the delta amount of movement from last data packet for player, not their real actual state of controls.

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

Answer by Arnleif · Nov 28, 2012 at 10:42 AM

There is a "Nav Mesh Example" in the latest Mecanim example in the store. It animates the character based on a velocity (from the navmeshagent). You might find it related to what you want to do.

Comment
Add comment · Show 4 · 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 eugeny · Nov 28, 2012 at 10:54 AM 0
Share

Not exactly. The Speed and Angular $$anonymous$$ovement hints from the Nav $$anonymous$$esh Example code are used only as hints to $$anonymous$$ecanim so it chooses appropriate animation. The real character movement is still far not equal to what Nav$$anonymous$$eshAgent suggests

avatar image Arnleif · Nov 28, 2012 at 11:03 AM 0
Share

Ok, I'm not sure what you really want to do, but it sound like you want to turn off 'apply root motion', bake all xz,y,rot movement into the anim (if such exist). Then move your characters transform and supply related values to the animator to make it animate something that almost matches the real movement. (Like legacy stuff). Sliding feet will of course occur to some extent.

avatar image eugeny · Nov 28, 2012 at 11:47 AM 0
Share

Thanks! That's exactly what I think I need, but I hoped that $$anonymous$$ecanim could do I$$anonymous$$ solving to avoid feet sliding in this case

avatar image Arnleif · Nov 28, 2012 at 12:01 PM 0
Share

I think the feet sliding would occur because you can not manage to match the anim with the real movement. If you did manage to match them (somehow with a lot of tweaking), it would have been the same as using animator to 'apply root motion'. Anyway, I would think you should be able to avoid most sliding if your anims does the same as the motion-variables you define/feed them. Not that I've tried this with regards to the ik.

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

11 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

Related Questions

Generic head rotation 1 Answer

Capture state exit point in mecanim? 0 Answers

How to create mecanim animations 2 Answers

mecanim run animation script trouble 0 Answers

Mecanim blend tree transition speed 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