I am working on character controllers in ECS and currently implementing crouching. I would like to resize the collider, but I am not seeing being able to do so, aside from creating a new collider every frame the crouch state is animating. Is this really the only option? Thanks!
Yeah, unfortunately there is not option other than to set a new collider. But a small optimization might be to store 2 colliders, original one and the crouching one, and then just switch between them. That way you won’t need to instantiate it every frame…
If the collider is a simple one, e.g. a capsule collider, you can tweak the underlying geometry. Check out the 5b. Change Collider Size in the samples. The associated script will act as a reference. @petarmHavok 's suggestion is the most generic approach though.