How can I move the camera diagonally only in two directions? (SOLVED)

Hello!! How are you?
I have the camera centered on my character, the character can move in 8 directions. How do I get the camera to move only diagonally to the left north and diagonally to the right south?
In other words, that the camera can be moved as in the photo.

Change both the x & y position of the camera by the same amounts? Positive for down-right, negative for up-left.

If this isn’t what you’re after, then maybe explain the problem you have, and what you’ve tried to remedy it already.

It is an isometric view project, the red rectangle in the photo would be the camera. In the center of the camera is the character. The character can move in 8 directions. In one of the scenes I would like the camera to just move as shown in the photo.
The context is that lava will flow from the top left, and the character will have to run down and to the right, but also up and to the left, which is where the lava follows them. So you would need the camera to only follow the character when moving up and left or down and right. Whereas if the character moves down and left or up and right, the camera should stay still.

Solved with conditions and variables. When the character simulates down and left, or up and right, change the variable to a different number that is not conditional for the camera centered on the character.