Advertisement

[UNITY] Character Control Problem

Started by February 15, 2018 05:50 AM
7 comments, last by Timothy Sharp 6 years, 9 months ago

So, I opened Unity today, fiddled with my character models, and it appears any asset i import, they rotate but they dont move. If I import a Character from Unity Technologies, It works perfectly.

Models alone don't animate.  You need to make sure you're getting an animation rig (also called bones and skeletons and weights) that tells how the model's parts move, and you also need animations that move the rig around.

Often the rig and the model are combined in the asset file so you need to make sure the proper import settings are used. Sometimes all three of them are combined and all three need to be extracted.  Other times they are individual files that need to be assigned their proper role.

Do you have those imported as well?

Advertisement
On 2/16/2018 at 11:01 AM, frob said:

Models alone don't animate.  You need to make sure you're getting an animation rig (also called bones and skeletons and weights) that tells how the model's parts move, and you also need animations that move the rig around.

Often the rig and the model are combined in the asset file so you need to make sure the proper import settings are used. Sometimes all three of them are combined and all three need to be extracted.  Other times they are individual files that need to be assigned their proper role.

Do you have those imported as well?

Yes, and that DID happen with a rig.It animates well, and rotates, but wont move

In that case, if you know the animations exist, ensure that they are being played.  Exactly how you do that depends on which method you are using. 

Based on what you wrote, I'll assume the model is imported correctly, the matching rig has been imported with the correct settings (probably "generic" with an avatar created from the model and using either no root or the correct root), and the animations have been imported with the individual clips identified.  Those are still my first guess at the error, but we'll assume they're working.

If you're using an Animation Controller state machine, you can preview that they're working correctly in the Animator window. The animations should play correctly as you preview the state machine. If the preview works then ensure you're correctly using the controller in code. If not, then it is probably one of the three model/rig/animation import settings; fix them and re-import.  Also is possible to mess up the details of an otherwise working model or rig or animations if you are really trying or messing around with them in code, but that usually isn't the case.  At that point if you've got them all linked but it still isn't animating correctly in game, as a beginner your best bet is to delete those assets, dump the code relating to animation, and start over. 

If you're applying animation clips directly either through the old "legacy animation" system, or if you're applying the modern application clips manually, it is harder.  You'll need to manually verify that each of the model/rig/animation parts are correct. The previewer mostly works okay with these, but sometimes has issues.

Finding those on the old system takes more work, and is easier if you're already familiar with how rigged animations work.  You'll need to ensure each animation clip works individually. They are easy to get wrong which is one reason the old system was abandoned. Use the debugger to ensure the expected model is being used, the expected rig is being used, the expected animation is being used, that the rig is set to the legacy animation system, and that generated elements are assigned to the right place (usually the root). Then go through the animations to ensure all the clips are identified, work through each animation clip to ensure the details work for the model, that they're using the right root and the right transform position and the right masks and the right everything else.  The key is that you must know what the right values are supposed to be, so if you have access to the animator who created them and the animator knows the details of how to use them, that's the easiest way to get them verified and corrected.  If you don't know those things, guess and check.

Activate Apply Root Motion in the Animator component. That will apply movement from animations.

B04103_05_21.jpg

1 minute ago, NajeNDa said:

Activate Apply Root Motion in the Animator component. That will apply movement from animations.

B04103_05_21.jpg

THANNNNNNNNNK YOU!!!!!!!

Advertisement
1 minute ago, Timothy Sharp said:

THANNNNNNNNNK YOU!!!!!!!

Lol, that was fastest reply in my life. I just closed the tab and got the email notification xDD

I hope it worked :D

Just now, NajeNDa said:

Lol, that was fastest reply in my life. I just closed the tab and got the email notification xDD

I hope it worked :D

xD I multitask I was on Unity and Chrome with dual monitors.

Also, it worked

 

This topic is closed to new replies.

Advertisement