Here I made it that the object will rotate.
It does that by looking at what position it first was and what the new position is.
The "time / duration" makes sure that the object will turn within the duration that it has been given.
Link to script page: Github
Here I worked with the Unity input system.
I made it so you can rotate, walk and pause the screen with keyboard and playstation/xbox controller.
Link to script page: Github
The First prototype, Here I made it so you can turn the object in all directions.
The third prototype, Here I was working on a simple pause screen and that the object rotates by input of a controller.
The second prototype, here I was working on how to rotate an object 90 degrees every time you turn it.
The final product, Here I put particles in the game with a bloom effect on them. I Also improved the rotation of the object.