Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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
2
Question by LilacGear · Mar 05, 2014 at 01:49 AM · animationmecanim

Character not moving (with animation playing)

when you view animations I've noticed that when you press play the default model walks. I've made my own animations in blender, exported fbx, using mecanim with bother legacy and humanoid rig types working find. When i try to move (wasd) it works the animation plays except that the character doesn't move physically. And when playing the animation the same thing it LOOKS like it's walking but it's not actually moving.alt text

character movement.png (69.0 kB)
Comment
Add comment · Show 3
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 zKici · Mar 15, 2014 at 02:58 PM 0
Share

I got the same problem

avatar image saruul34 · Mar 15, 2014 at 04:28 PM 0
Share

Your animation doesn't change position. Or Apply Root $$anonymous$$otion is unchecked.

avatar image games4ever · May 24, 2016 at 10:16 AM 0
Share

Hi,

I've solved this problem by separating the player's physics system from the character Animator.

The structure is like follow:

  • PlayerGameObject (it has the physics system & move controllers)

  • PlayerAnimationsGameObject (follows the PlayerGameobject) -> AnimatorControllerGameobject (child of AnimationsGameObject; it has the animator)

4 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by zKici · Mar 15, 2014 at 06:34 PM

Hi,

please take a look at this:

http://docs.unity3d.com/Documentation/Manual/ScriptingRootMotion.html

Unfortunately it seems that when the animations are done as "cycle" you will have to script your own "move" script, still using Mecanim however, it might be even better scripting your own, more control etc.

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

Answer by vizardgames · Sep 06, 2017 at 03:45 PM

//just add this to your character script`

  void OnAnimatorMove()
     {
             Animator animator = GetComponent<Animator>(); 
                               
             if (animator)
             {
      Vector3 newPosition = transform.position;
                newPosition.z += animator.GetFloat("Runspeed") * Time.deltaTime; 
      transform.position = newPosition;
             }
     }

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 TenzoDEV · Apr 14, 2019 at 05:04 PM 0
Share

ik this post is more than a year old but i need help

avatar image TenzoDEV · Apr 14, 2019 at 06:23 PM 0
Share

doesnt work for me it just says " The local function 'OnAnimator$$anonymous$$ove' is declared but never used" pls help!

avatar image krispastas TenzoDEV · May 07, 2019 at 02:24 PM 0
Share

You don't need to script anything. In the animator component tab you should enable 'Apply root motion' and that's it.

avatar image
0

Answer by mother_chucker · May 22, 2019 at 02:49 PM

@krispastas Apply root motion doesnt work for me , i dont know why, and neither does the script up there, any solution? ,@krispastas not working for me, the guy still wont move, just plays animation in the same place... the script up there isnt working as well... dont know what to do

Comment
Add comment · Show 1 · 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 G4M3R72 · Feb 13, 2020 at 02:57 AM 0
Share

same problem for me, plus my character gradually falls over.

avatar image
0

Answer by NOGOODGAMES · Apr 09 at 01:34 PM

In case anyone stumbles upon this, the best solution is: Create an empty gameobject and parent all your rig's hierarchy and skinned meshes under it -name it animator -copy and paste the animator component from your parent gameobject to the animator gameobject you created

Everything should work fine. The idea is, you don't want to have the logic for movement on the same gameobject as the gameobject where your animator component is attached.

Hope this helps someone!

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

30 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

Related Questions

old animation system 0 Answers

Twisted hand using Mecanim 0 Answers

Use Humanoid Animations with aditional bones 2 Answers

How do I access the "Average Velocity" of a run animation? 1 Answer

free motion in mecanim 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