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 Runewake · Jan 26, 2014 at 01:57 AM · animationcharactercontrollermecanim

Floating Mecanim Player with Character Controller

I am using a character controller attached to my mecanim animations to control my player in the game world. I have experienced two cases, both related to the same problem.

Firstly, if the character controller and animator are attached to the same object: The character moves up and down as he walks. This moves the character controller off the ground and it detects itself as not being grounded which breaks our jumping logic (only jump while on ground). This occurs at a rapid pace and is more or less completely random.

The second case is when the animated player is a child to the character controller. In this case, I move the character controller by the animated players local XZ coordinates every frame and then reset those to 0. This fixes the issue of not being grounded. However, it introduces two more issues. Firstly, if I reset the Y axis to 0 it causes the player to stutter up and down slightly (just noticeable). If I do not reset the Y axis due to some noise from the axis the player moves slightly up or down. After a minute or two this becomes significant (half a unit or more).

Is there some way to account for this without having to do all of this? If not, is there a better way that I am not using?

Comment
Add comment · Show 2
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 getyour411 · Jan 26, 2014 at 02:10 AM 0
Share

"The character moves up and down as he walks" - do you mean during animation his origin or actual transform.y was modified?

avatar image Runewake · Jan 26, 2014 at 03:12 AM 0
Share

The players movement in game is linked to the movement in the animation. So as he moves in the animation he does as well in the world. The transform changing is what is causing the issues as the character controller is using that for it's Capsule Collider.

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

18 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

Related Questions

Multiple movement modes in mecanim 0 Answers

Basic animation key press 0 Answers

Does character bones and rigs should be according to mecanim clip ? 0 Answers

Mecanim Tutorial lacking animation? 1 Answer

How can I give variation to animation curve in Unity? (Raw mocap data) 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