Constant Camera travel along a single axis

Hi, just starting out on UE4, I am trying to do a simple side scroller, very much like jet pack joyride. I am trying to figure out how to set up the camera properly. I want it to follow the player that will be travelling along the X axis. It should be constrained to that axis only and never move along the Y or Z axis.

For now I have figured out 2 options, one would be to have an independent camera that gets the player position X component and uses that for its own X coordinate. I have tried this but I get a small jitter. I am supposing this might come from execution order and I haven’t figured out how to fix it.

The other option I see is to have the camera as a component of the player, but I can’t seem to figure out how to have it ignore the Y and Z axis of the player. ( I have tried this method and I get no jitter whatsoever)

Thanks

Use a spring arm and uncheck “Use Pawn Controller Rotation” “Inherit Pitch, Yaw, Roll” boxes.

Hi, tried that doesn’t seem to work for me,if you launch the sidescroller demo, what I want is when the character jumps, the camera doesn’t go up. In effect I want the camera to follow only the X component of the character.