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 jwinn · Jan 18, 2013 at 06:21 AM · charactercontrollermecanimroot motionclimbingclimb

Problem with CharacterController, Climb Animation, and Root Transform Position Y

I'm working with a CharacterController and Mecanim, where root motion is driven by the script (no rigidbodies). The problem is that the climb animation is causing the character to move upwards in parts of the animation where it shouldn't. Particularly when pulling up onto the ledge.

I'm using the JumpUpHigh animation provided by Unity, and was attempting to copy the technique presented at 37:00 during this keynote. It's the bit about climbing onto the shipping container. This is also found in the script "TargetMatching" that comes with Mecanim demo files. The MatchTarget is actually working correctly, besides the bad extra Y movement at the top of the animation.

  • Tried every darn setting on the clip. Root Y based upon Original, Body Mass, and Feet.

  • Of note: When I test the bake Y into the pose option, it animates correctly (does not move upwards after hands grip and pull up)

alt text

climb_animation.jpg (105.3 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 jwinn · Jan 18, 2013 at 07:25 PM 0
Share

To clarify, in the above screen, the Root Y is set to Feet. First the grip location is too low, then the character moves up from that position, and gets onto the platform. When Root Y is set to Original, it's somewhat similar. When set to Center of $$anonymous$$ass, the character gets even funkier, moving up several extra meters throughout the anim, including again at the very end.

Root motion is applied in the custom controller in OnAnimator$$anonymous$$ove with Vector3 newPosition = anim.deltaPosition;

And then the $$anonymous$$ove() function in update, moves the character to this new position.

1 Reply

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by jwinn · Jan 21, 2013 at 12:32 AM

I figured out a solution.

1- During the animation, I was disabling gravity. By re-enabling gravity as soon as the feet touch the ledge, there is no longer a noticeable extra upwards movement. I check the following to disable gravity on the climb up:

     if ( currentBaseState.nameHash == climbUpState 
          && currentBaseState.normalizedTime < 0.680 )

2- Making "MatchEnd" a lower number helped to align the hands at the initial part of the jump.

Comment
Add comment · 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

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

10 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

Related Questions

Issues with Apply Root Motion for Climbing up 0 Answers

Best climbing system! 1 Answer

Keeping characters within Fighting area 1 Answer

Root Motion or CharacterController in FPS 1 Answer

When Root Motion anims reset character position, collision objects are ignored 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