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 _Shockwave · Mar 28, 2013 at 05:44 AM · controllermecanimlocomotion

Distance travelled by a character is limited (capped) when using Mecanim

I'm trying to use Mecanim to animate my character instead of using the old legacy system. Mecanim needs the animation to have Root Motion, so the animation is already moving forward and we can specify the speed of this motion in the animation state.

I have followed the tutorial on the new Learning center. However, no matter how much speed I try to add, the amount of distance travelled by my character is more or less the same.

Video showing that the distance travelled is limited!

I created a video to show you what I mean. In this video, I'm using Mecanim animations provided from the free Project Stealth available for Unity 4.1. The version of Unity that I'm using is 4.1.2f1.

My question is how do I modify the amount of distance travelled?

Why is the amount of distance travelled by my character is capped (limited)?

Here's a screenshot of my Blend Tree locomotion state (Walk threshold is 1.5 and Run is 5.6)

alt text

And this is the condition on the state transition between Idle and movement

alt text

Here's a screenshot of my animation controller

alt text

Here's a screenshot of my character's inspector

alt text

P.S: PlayerMovement Script is unchecked on purpose. I want to see the character run by itself forward. Even if I enable PlayerMovement, then when I move forward using keyboard input, the distance travelled by my character is still limited.

Please help! I don't know what's wrong any more!

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 TonyLi · Apr 01, 2013 at 01:52 PM 0
Share

$$anonymous$$aybe there's an issue with your physics components (rigidbody and capsule collider). To isolate just the animation, try previewing it on your character. Select the animation, drag your character into the preview area at the bottom of the Inspector panel, and hit play.

1 Reply

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

Answer by willgoldstone · May 01, 2013 at 02:16 PM

Hi there, this could be a couple of different things, and despite your high detailed post I'm still not totally sure which it is.

From the video link, it appears to be a scale issue, though often with a scale larger than it should be, graphically it should display wrongly to show you this. Is the character roughly the height of two cubes? (2 units tall) This is pretty standard for a humanoid.

Next thing to ask is where you're drawing the animation from - is it your own or some animation data you've downloaded. If so, where from? We'd also need to see your code so please paste us it or link to pastebin.com.

If you want to prefab and export the character and its dependencies and upload them somewhere, i'm happy to take a look at this for you.

Comment
Add comment · Show 3 · 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 willgoldstone · May 01, 2013 at 02:33 PM 0
Share

Our $$anonymous$$ecanim $$anonymous$$m just pointed out that you haven't checked 'Animate Physics' in your Animator - as you're using a rigidbody, this is important. Try that and let us know.

avatar image _Shockwave · May 05, 2013 at 11:56 AM 0
Share

Thanks for your reply Will. The problem is the scaling indeed. I'm using the animations provided from the free S$$anonymous$$lth Project provided by Unity. The animations have the scale factor set to 0.01. And your character (ethan) in the S$$anonymous$$lth project is also set to the scale of 0.01. So when I scaled my character to 0.01 scale factor, the character started running normally. Now, for my character, putting 0.01 as the scale factor makes my character very tiny in my scene.

I tried changing the scale factor to 1 for your animations but that made the model overlap between its parts (legs and hands are overlapped in the chest area ... very disturbing lol).

So how do I use your free mecanim animations for scale factor of 1 rather than 0.01 ?

avatar image _Shockwave · May 05, 2013 at 12:25 PM 0
Share

Ok, I have solved it! You need to re-apply the rig for your model avatar by going to the Rig tab and choosing copy avatar from model then choosing "None" and apply changes. Then, choose create from this model and hit apply. I found the solution in a forum post here by Alf203. The screwed up model upon changing scale factor with mecanim seems to be a bug

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

12 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

Related Questions

Anyone have a 'click to move here' character controller script? 1 Answer

Skills controlled by animation (event callbacks and parameters) 0 Answers

Mecanim controler problem 0 Answers

Mecanim Runtime Controller is Private! 0 Answers

Mecanim and Child Objects 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