Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 Arkade · Jun 24, 2017 at 07:41 PM · rigidbodymecanimroot motiongeneric

How to maintain Mecanim generic root motion velocity from one state & clip to another with no actual root motion.

I have a quadruped that 'bounds' as its run (leaves the floor each 'step') and uses root motion. Using an anim clip event, I am ray-casting at the peak to determine whether the landing will actually land on something. If it will, I continue the clip. If not, I rapidly transition to a falling state which uses velocity to ray-cast for when to revert to the landing animation. The problem is my falling animation has no actual root motion -- it is stationary and falls under gravity on the rigidbody on the game object. The problem is that forward velocity seems to be automatically tweened from the bound clip's velocity (about 2m/s) to the fall clip's velocity (0) so as soon as I detect falling should happen, the animal comes to an abrupt halt mid-air then falls gracefully down! (the gravity-based fall is working fine)

  • I am using a Blend Tree for the run. 2 layer nested 1D tree same as the mecanim sample (AI teddy in a maze). 1'st controls walk/run, 2'nd controls steering. As yet, there are no 'walk' motions and the speed is fixed at 1 = run.
    • I am using "Animate Physics".

    • Culling mode is currently set "Always animate".

    • It has a Capsule Collider with a frictionless physic material.

    • The fall clip is actually a single frame atm (the same as the peak of the bound). That'll change in time.

    • The "Motion | Root motion node" setting for the clip is "None".

    • The fall clip has all movements baked into pose (which I thought removed the effect of root motion, right?)

    • I've tried with and without looping on the fall clip.

    • Its Rigidbody has "Use gravity" set but not "Is kinematic". It also has "Freeze Rotation" set on all axes.

Attempting to work-around, I've tried recording the rigidbody's velocity at the peak before ray-casting (the value looks fine) then assigning back to itself from various places while transitioning. This doesn't seem to work. I tried from a StateMachineBehaviour's OnStateUpdate() and a MonoBehaviour's FixedUpdate() (repeated). When it's assigned over several frames, I just seem to freeze the object in the air -- obviously gravity doesn't affect -- but it doesn't move forwards either!?

I've included screenshots of the two clips below, 1'st bounding, 2'nd falling.

Hopefully I'm doing something dumb! I'm happy to provide more details etc. Thanks in advance!

bounding clip

falling clip

unityanswers-02-fall.png (48.3 kB)
unityanswers-01-bound.png (47.8 kB)
Comment
Add comment · Show 1
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 tcz8 · Mar 30, 2020 at 09:21 PM 0
Share

Did you ever find an answer to that? I get the feeling we will have to do it manually through a State $$anonymous$$achine Behavior or on Animator$$anonymous$$ove.

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

90 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 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 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 avatar image avatar image avatar image

Related Questions

How does the Animator drive Rigidbody with root motion (in detail)? 1 Answer

Player with Rigidbody gravity and root motion bobs up and down into the terrain 0 Answers

[mecanim]: BindSkeleton: cannot find ...? How to fix it? 0 Answers

MecAnim Root Motion - How To Prevent It 2 Answers

Mecanim is really really annoying!! 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