Top down rotate tank in joystick direction and keeping it follow the surface of a ramp properly

Hi everyone

I have this tank in a top down view when i move my joystick up my tank will rotate and move towards that direction. i rotate the z axis and the x and y remain 0.

But now i want to be able to climb ramps but my tank rotation will make my tank not follow the surface properly.
So somehow i want to be able to rotate my tank according to my joystick direction but keeping the up direction the same.

Relative rotations wont work because of the way I implement my movement with the joystick.

I currently switched from unity to unreal for some proper reasons, so I had this project running before in that engine i used transform.rotate which worked properly except for some times on extreme angles

Can anyone please help me out? I’m really stuck on this part.