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 /
This question was closed May 11, 2014 at 12:34 PM by meat5000 for the following reason:

The question is answered, right answer was accepted

avatar image
0
Question by infinitypbr · Jun 16, 2013 at 06:00 AM · movementmecanimroot motionnpc

Mecanim Root Motion -- Not Moving Forward?

Hello,

I figure it's been a couple hours of searching so it's about time I ask the question.

HERE IS A VIDEO: http://www.sfbaystudios.com/rootMotionProblem.mov [you can see when I click "Root Motion" the enemy moves up/down and the motion is certainly being added, it's just not moving forward]

How do enemies (not the player character, basically) move with Mecanim? I've got a character set up to increase speed when the player is close to him. And in Mecanim, the walk animation begins when the speed is above 0.1. When I begin the game, the player is close to the enemy, so the enemy begins the walk animation. However, the animation stays in one place. The enemy does slowly move around in a circle (no forward motion, just a slow turn while staying still [animation is playing])

I can't seem to figure out why the enemy character is not moving forward. I'm guessing that since the enemy is slowly rotating that there is actual force being put on him, but I don't know why it's stuck in one spot.

Any ideas why the enemy doesn't move forward, but only slowly rotates on the Y Axis?

 function Update () {
 
     distanceToPlayer = Vector3.Distance(transform.position, playerObject.transform.position);
     if (distanceToPlayer <= 10)
     {
         currentSpeed = Mathf.SmoothDamp(currentSpeed, maxSpeed, speedDampV, speedDamp);
         enemyAnimator.SetBool("isChasing", true);
     }
     else
     {
         currentSpeed = Mathf.SmoothDamp(currentSpeed, 0, speedDampV, speedDamp);
         enemyAnimator.SetBool("isChasing", false);
     }
     enemyAnimator.SetFloat("speed", currentSpeed);
 }
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 infinitypbr · Jun 16, 2013 at 04:54 PM 0
Share

Any ideas? I asked late at night, so I'm hoping daytime users would be able to help. I also did this in a brand new scene with nothing but the character, and the same result happened.

avatar image infinitypbr · Jun 16, 2013 at 06:41 PM 0
Share

Here is another video example: Two characters (including a male from $$anonymous$$ixamo) that are scripted to idle for 5 seconds then run for 5, then idle for 5 on a loop. You can see them not moving forward, even though they are running, and the 2nd half of the video shows the states in $$anonymous$$ecanim.

http://sfbaystudios.com/root$$anonymous$$otionSecond.mov

1 Reply

  • Sort: 
avatar image
0
Best Answer

Answer by infinitypbr · Jun 16, 2013 at 10:01 PM

It looks like the animation fbx file I had "in place" checked, so I paid $15 for a walking one that did not have in place checeked.

Comment
Add comment · Show 2 · 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 breakspirit · Aug 12, 2013 at 03:19 AM 0
Share

Where is this "in place" checkbox located? I'm having the same problem.

avatar image infinitypbr · Oct 08, 2013 at 09:39 PM 0
Share

It's when I bought the motion from the $$anonymous$$ixamo store.

Follow this Question

Answers Answers and Comments

15 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

Related Questions

switching between Motion matching and animation files 0 Answers

Mecanim: 2D Blend Trees, Unable to Compute Positions. 0 Answers

Mecanim Making an NPC walk 1 Answer

NavMeshAgent using Root Motion for move speed? 5 Answers

Mecanim: Bake Only Z Root Motion Into Pose 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