Constrain along y-z plane

ACharacter movement was simple, but collision is causing my character to get pushed off of the proper plane. How do I stop this from happening? I thought locking an axis in the physics settings would have locked it, but it only locks for things the ACharacter runs into, not the ACharacter itself.

Thanks for the help

After screwing around with CharacterMovement, I found the solution. I got really strange results with SetPlaneConstraintNormal, but I then tried

CharacterMovement->SetPlaneConstraintFromVectors(FVector(0, 1, 0), FVector(0, 0, 1));
CharacterMovement->bConstrainToPlane = true;

and it now doesn’t move on the X plane during collision.