How to lock char's capsule in the "Y" axis

How to lock the character’s Capsule component in the “Y” axis?

I am working on a project that the character only goes forward or backward in the “X” axis, but when it touches a object in the map, it pushes the character aside, to the “Y” axis.

I don’t want the character to move in the “Y” axis, only the “X” axis.

I could solve this problem using the “Event Tick” node but i am looking forward a lighter solution than setting its location each frame in the “Y” axis.

I can’t lock the Character’s Capsule Component in the “Y” axis via constraint because it should have ‘Simulate Physics’ option enabled, the Character’s Capsule Component doesnt simulate physics.

Any ideas? Anyone?

Found the solution, it is the “character movement” component.