Crouch animation floating in air

epicever

Member
I went through a whole discussion with Davio13 about this in discord (I am Daniel(epicever)) so you can see a lot of details about my project there with screenshots. But the problem is that I'm trying to create my own animator controller but the crouch animation does not lower the character to the bottom of the collider. I'm using the crouch animation provided with the controller but that doesn't work but when I swap to the default UltimateCharacterController animator it crouches and lowers the character to the ground where the base of the collider is.

 
Are you using a custom character model+rig? If so, you may need to set the animation to use the same rig as your character. You can do this by selecting the animation fbx, on the "Rig" tab in the inspector, set the "Source" parameter. Another thing to look at in the animation settings is in the "Animation" tab, take a look at the "Root Transform Position (Y)" settings, e.g. these are the settings used for the AimCrouchIdle animation in the demo:

1626770933481.png
 
Ok, are you able to reproduce it in the demo scene at all? E.g. by replacing Nolan's animator with your own? If so then the issue is within your animator controller - I'd start by looking at the relevant substates of the demo animator (e.g. Base Layer -> Crouch) and try to match your animator's structure as closely as possible to that, making sure to check all the transitions too.
 
Ok, I've copied all the states and their transitions from crouch sub states into my animator controller from the base layer of the ultimatecharacteranimator controller but it still occurs
 
Have you tried your animator controller on the Nolan model? The only time that I have seen that occur is when the animation's pivot position isn't at the feet, but if you are using the built in crouch animation then that shouldn't be a factor.

If your animator controller doesn't work correctly on Nolan then it's definitely a problem with the animator controller. You could narrow it down by only having a single layer/state with crouch to see if you can get it to work in a simplified state.
 
I have the exact same issue. And I noticed that its in the demo scene aswell:
nolan_floating.PNG

Any infomation about my project, settings or want me to send screenshots let me know!
 
Last edited:
That's generally caused by the root position of your animations not moving correctly. Did you replace the animations? Can you reproduce it within a fresh project?
 
That's generally caused by the root position of your animations not moving correctly. Did you replace the animations? Can you reproduce it within a fresh project?
I will provide the information as soon as I get home.

But in the meantime, I have not changed anything about the demo anination controller nor any custom animations for the demo character.

I have a custom animatior override on my AI characters.
 
You should enable drawing gizmos and check if it's a collider problem, e.g. the capsule collider positioner might not be set up with the right end points as it is in the demo scene. But yeah this looks like an animator/animation issue, but it's weird that you said you're not using any custom animator/animations on that character.
 
You should enable drawing gizmos and check if it's a collider problem, e.g. the capsule collider positioner might not be set up with the right end points as it is in the demo scene. But yeah this looks like an animator/animation issue, but it's weird that you said you're not using any custom animator/animations on that character.
My first thought was the capsule collider aswell. I posted a screenshot in the discord on my character with gizmos and capsule collider visible and you can see that the character is crouching but the capsule stays basically the same size.
 

Attachments

  • unknown-1.png
    unknown-1.png
    186.8 KB · Views: 5
Alright I have tried a couple of things. First of all I started a brand new project and imported the TCC and set it all up and crouched and that did work just fine.

I took screenshot with the gizmo collider on for you to see:
Standing
Character_Standing_capsule.PNG

Crouching
Character_crouch_capsule.PNG

A better view from the range above the ground
Character_crouch_capsule_clearview.PNG


The character basically crouches and just lift his feet up, and the capsule collider under him wont change anything. Ill try to find any difference between the working scene and my scene, but if anyone has any idea please share your thoughts!
 
I made a new character using the character manager tool, and he does the exact same thing. I compared all the animation settings, all camera settings, all character locomotion settings and all the height change ability settings. There is no difference in any of them but still he just crumbles up mid air instead of crouching.
 
Hello, I'm having the same issue, I've copied transitions and state machines for the crouch ability, but my character still rise its feet instead of lowering the body. If I use the demo animator controller it works fine, but when I use my own the problem shows up. Any suggestions?
I've tried checking the animation settings in the CouchIdle1 animation, since it is the one I'm using, and its the same as in default.
The character model I'm using does not have an upper chest body bone, but it works just fine with the demo animator controller.
Does any other animator layer is used to the couch animation? I'm only using the base layer.

1629860894601.png
 
Are you on the latest version (2.3.5)? Have you tried the other suggestions from this thread, in particular the root transform settings on the crouch animation?
 
Hello, I've solved it!
Just in case anyone runs into this problem, my problem was that I had not set the Base layer as IK pass in the animator controller.
Once I did, it works perfectly.
Thank you!
 
Top