Actor rotates along the Y axis but not X.

Hi everyone,

I feel as though this will be a super simple answer but I just can’t wrap my head around it.

All I’m trying to do is flip my rectangle -90 degress in one direction when I press “1” and then flip it back again.

it works perfectly when I set the lerp roator to -90 on the “Y” axis but when I switch it to the “X” axis it just moves once and I cant get it to flip back. All my prints work fine and it prints 0 and then 1 after each key press.

Is there some setting I’m missing for the “X” axis?

Many thanks in advance.

In your code you are only rotating the box from X0 to X-90, there’s no code to rotate it back from X-90 to X0.

Thanks for the reply, I’ve sorted it now.

It does what I want it to do by using the Z axis instead of the X axis. I guess I was just assuming X would be the correct axis to move it from left to right. I didn’t even think to try Z.

I was using the reverse in the timeline to move the actor back, I didn’t think it was necessary to have code specifically to move it back.