Locking motion for character controller

Hi I finally finished most of my tutorials so I started to work for a fighting game for the characters I’m using a character collider same for the enemy so I can animate them now the problem I been having is that once the player and the enemy collide with each other due to the capsule collider we slide out to the edge.

What I’m trying to accomplish is to lock the motions onto the x axis I do know I can use the configurable joints but it will only let me do that for rigid bodies any way to work around it?

Or should I use rigid bodies for the character and enemy?.

The only reason I didn’t use rigid bodies is due to the act that sometimes I get weird physics due to rigid bodies

This is a Super Smash Bros style game right? If so put invisible walls on the sides so it cannot slide to the side only back.

that’s a pretty good idw i’ll try that first now in code if i would like to add a combo system how will i go about it??
oh and so far i don’t know yet how to make the player or the enemy hit each other i got the animations but the only idea i have so far is to add a collider on the hands and feet to hit each other and do some on collider or trigger enter functions.

and so far im still working on the ai so far the enemy can run away from me if or after me.

i still have to make it so they always face each other in which i believe i should use look at for it.