I faced the same problem but with the two axis and I solved it this way:

I think it is one of the simplest ways to do it so I hope it helps someone.
I faced the same problem but with the two axis and I solved it this way:

I think it is one of the simplest ways to do it so I hope it helps someone.