Hi all!
I’m currently working on a small game where I would like to rotate the camera depending on the state of one of my variables. The game has 4 walls, here’s a screenshot, all tagged according to which wall they are. When the player hits one of the walls the gravity changes to make it so that the wall acts as the ground in which the gravity pushes down on, I’d like to rotate the camera to reflect this.
The variable currently responsible for change in gravity is gravityState, when this = 1 the gravity acts down, 2 = left, 3 = up, 4= right. I’ve got no idea how to code a change in the camera’s rotation so that it not only reflects gravityState, but also have the rotation happen over a small period of time.
Any help with the code would be greatly appreciated.