Rotate object of certain degree on button press

Hello!
Than’s you in advance for any help!

I have to rotate of 90 degree my object when a button is pressed, right now i’m able to do it, but is going back to 0 when a button is up…

Any help?

Good day.

In your code, you use mouseinput to set the rotation…

Mouseinput is a variable that become 1 while the mouse is pressed .
And 0 while is not pressed…

You need to make a method to activate only once when detect with Input.Getkeydown.

Bye.