How to keep/move the Player capsule in the camera's position while changing it's half-height (for a mid-air crouch).

I’d really like a mid-air crouch mechanic in my game but changing the capsule’s half-height does so from the middle of it leaving the camera above oustide of the capsule. And sure I can just adjust the camera’s location but then it goes down while crouching mid-air which doesn’t look as good and smooth. I kind of tried everything I could think of, I’ll take any suggestions and ideas anybody could have.


Unfortunately haven’t gotten a single reply but I’ve managed to come up with something that’s good enough of a solution for me and I’ve decided to share it here just in case somebody runs into a similar problem as me.

So what I’ve made is basically Player going from crouching to crawling once they get close to an object while crouching.

Speaking more technically while the Player is crouching the camera will still be outside of the capsule but once they get close to something it goes down to dodge clipping through stuff and that leaves us with being able to crouch mid air.

Hope I worded everything correctly, I’ll be happy to answer any questions though.
Feel free to try it out and experiment with it for yourself!