Capsule Collider Positioner sets incorrect height

hoodust

Member
The main character capsule collider is set (and upon play starts) at the correct height, but throughout play often is much smaller than it should be (e.g. around the shoulders instead of to the top of the head). This can be caused by jumping, or crouching, or simply walking around. Sometimes while walking/running it will return to the correct height (or close enough) seemingly randomly, but sometimes it will not. Sometimes when it's already smaller than it should be, crouching will make it even smaller (e.g. to the height of the hips, see first screenshot).

This consistently causes issues with clipping, especially when jumping when there is not normally enough room to jump (see second screenshot).

Overall, the collider is not the correct height around 80-90% of the time.

It is however consistently even with the bottom of the feet.

The most consistent way to reproduce it is to jump once or twice (getting the capsule top stuck to around the height of the shoulders) and then crouch (getting is stuck to the height of the hips).
 
Last edited:
Fyi, this bug also exists in the demo scene with the demo character, and is easy to reproduce. It seems like walking/running on slopes sets it off.

1688342700773.png
 
Thanks for the clear repro steps. I was able to reproduce it and will have it fixed in the next update. If it's something that requires minimal code changes I'll post it here.
 
I have a fix for this. If you change CapsuleColliderPosition.FixedUpdate to LateUpdate then it'll work correctly.
 
I have a fix for this. If you change CapsuleColliderPosition.FixedUpdate to LateUpdate then it'll work correctly.
Sorry, do you mean change FixedUpdate() to LateUpdate() in CapsuleColliderPositioner.cs?

I tried this and it didn't help for me in my game or the demo (and I tried updating the demo to .13). I can take a short jump or two on the uneven terrain in the demo's Locomotion module and then crouch a couple times and still get the top of the collider stuck well below the shoulders. Unless I misunderstood the instruction.
 
Thanks for the clear repro steps. I was able to reproduce it and will have it fixed in the next update. If it's something that requires minimal code changes I'll post it here.
Any ideas since this didn't fix the problem for me? It didn't happen in V2, but looking at the code I can't tell what changed except a radius/scale method rename and some seemingly unrelated cleanup.
 
I haven't had a chance to take a closer look at it yet but it'll definitely be fixed before the next update :)
 
I haven't had a chance to take a closer look at it yet but it'll definitely be fixed before the next update :)
Haha, sounds like that might be a bit ? No sweat! It's not an urgent matter, just wanted to make sure it's still on your radar. Thank you!
 
Top