Runner game collider

How to set collider for runner game’s main character?

Basically I was setting box or capsule type collider in game. This colliers work for you if you have only running and jumping action to perform.

But what if I have to perform sliding and hit action?? I have animation clip for this purpose then how can I attach colliders for those actions!!

Please if you have experience regarding this genre of game then give me some ideas.
Thanks for giving me your time.

On your animation clip you can add a new property as for your problem add that gameObject’s collider as a new key or property. If you have a sliding animation then you can either adjust the size or destroy that collider while sliding