Fuse
(Solved) Unity Character Controller Issue?
I'm not even sure what information I would need to include, to help diagnose the problem here, since I'm still fairly new to Unity, but this is the basic problem I'm having... (with a character built in Fuse, rigged on Mixamo, and imported into Unity)...

I have the character setup with a third person controller. My "Mesh Character" or whatever (basically the FBX I imported from Unity) has "Transform, Animator, and an animator control script" on it...

I have that FBX file parented under an "empty game object" which I added the Third Person Controller script to (which also has the "Character Controller" capsule set as it's collider)...

I imported some random free Mixamo animations just to get started (stuff that doesn't make sense) so the "Idle" is used as Idle, the "Gangam" is used for a running animation (sort of looks like I'm floating on a horse), "Zombie Walk" was used as the basic walk, etc...

Anyway... THE PROBLEM I'm having is...

If I just randomly run around in my scene for 30 seconds or so, running, jumping, just "moving" for a while to test stuff out, then I notice that my "Character Controller / Capsule Collider" is no longer attached to my FBX character file... I mean, it's "attached" but it'll be repositioned slightly to the left, and slightly behind the character (but it starts out perfectly synced up).

I've messed around with some of the Animation options, like bouncing between "Original & Body Orientation", I've tried "Bake to Pose" for some of the root transforms (and tried it without)... I've messed with the "Offset" in the animation inspector, so that if my walk animation randomly veers to the right, I know how to fix that with the offset to make it appear straight (so that the "Average Velocity" is set to (0.000, 0.000, 0.000) on all animations... And the "Average Angular Y Speed" is set to 0.0 degrees...

So any other suggestions for things I should look into, to make sure that my "Character Controller / Capsule Collider" will ALWAYS stay with my main character FBX model? It wouldn't be a huge issue, but once that capsule gets far enough away, then my character can start walking through walls (the character, NOT the capsule collider) because the character is no longer INSIDE those boundaries.

Know what I'm saying? Anybody have ideas for things I can try to fix this? Or even just "stuff to look up" so I can learn more about it? I've done Google searches on things like "Unity3D Character Controller offset" and "Unity3D player falling out of character controller" and things like that, but I don't seem to have the right word combination to lead me to any sort of answers.

Thanks in advance to anybody that might have suggestions. (And I'm mostly posting this here BECAUSE it seems like the Mixamo animations are the culprit). If I take those off, and JUST run with the T-Pose, so no animation at all, then the capsule collider sticks to me like glue, and it's all good.

OH! One more thing... If I JUST use a single animation (like the Idle animation), then that SEEMS to work ok as well, but once I go into the Animator, and have it transition into other animations (for running, or jumping, or whatever else) THAT seems to be where it breaks. So, maybe it's not the Mixamo animations, and maybe it's some sort of issue inside the "Animator"? I'm lost at this point.
Naposledy upravil Chronoloco; 28. lis. 2013 v 3.32
< >
Zobrazeno 13 z 3 komentářů
Nevermind... I just now realized that the "Apply Root Motion" box was checked in the Animator, and I wasn't really sure what it was, so I left it alone. Apparently that (if I understand correctly) allows the animation to actually control the direction / rotation of your character, and that must have been what was knocking my character out of sync. Once I unchecked that, all of the movements & custom scripts for movement that I added, seem to work as intended. So this problem has been solved. (as far as I can tell for now) I spent ALL DAY yesterday writing a custom script for this, trying to figure out a way around the issue in C#, and finally got frustrated enough to ask here for help. I could have saved an entire day's worth of work, by unchecking that box... hahaha... *sigh* On the bright side, my C# chops are feeling strong right about now, so that will help me with custom scripts in Unity for the future at least.
Naposledy upravil Chronoloco; 28. lis. 2013 v 3.36
haha, well I'm glad you solved your problem :) sorry we couldn't get to you sooner. If you have any other issues, feel free to post!
mouxe  [vývojář] 29. lis. 2013 v 18.31 
The Godfather původně napsal:
Nevermind... I just now realized that the "Apply Root Motion" box was checked in the Animator, and I wasn't really sure what it was, so I left it alone. Apparently that (if I understand correctly) allows the animation to actually control the direction / rotation of your character, and that must have been what was knocking my character out of sync. Once I unchecked that, all of the movements & custom scripts for movement that I added, seem to work as intended. So this problem has been solved. (as far as I can tell for now) I spent ALL DAY yesterday writing a custom script for this, trying to figure out a way around the issue in C#, and finally got frustrated enough to ask here for help. I could have saved an entire day's worth of work, by unchecking that box... hahaha... *sigh* On the bright side, my C# chops are feeling strong right about now, so that will help me with custom scripts in Unity for the future at least.
Right, using root motion makes sense if you have animations that are non-linear (running to rolling to running), or you have a set of animations with precise foot placement requirements. Basically, the motion applied to the root joint will locomote the character. You then don't move programmatically using say, a constant speed and direction, but rely on the animation to move. It's a more complex way of putting motion on a character, but can result in less "foot slide." Your animations really need to be tailored to every type of motion you can evoke, however, so there are typically more animations required.
< >
Zobrazeno 13 z 3 komentářů
Na stránku: 1530 50

Datum zveřejnění: 28. lis. 2013 v 3.11
Počet příspěvků: 3