Hi! So I'm a complete beginner to programming and Unity. I am a artist who just wants to bring their game making dreams to life. I've always heard to start off with a very simple game to learn, so I came up with this idea for a cube swipe game. However I can't even get the cube to rotate properly! It makes me feel so defeated.
** I am using the latest version of Unity. The game I'm making is viewing the scene directly straight, making the game appear 2D. However, the cube itself is 3D. The idea is that when you press A, the cube will rotate 0, -90 , 0. Then when you press D it will rotate 0, +90 , 0. When you press W it will rotate +90 , 0 , 0 , and when you press S it will rotate -90 , 0 , 0. The player should be able to turn the cube 90 degrees whenever they want. So left, right, up, down. Also I want the cube to rotate smoothly rather than instantly turn. I will eventually translate W,A,S,D to just tapping on left, right, up, down on the screen to make the game a mobile game.
the issue I deal with is that sometimes the cube will just turn incorrectly! Say the yellow side is facing the camera. If I press W, it will rotate clockwise rather than rotate up to the next side. which I think is due to unity refusing to go past 90 degrees and looping back to 0. Its very frustrating and i cant find any tutorials to properly execute my idea!
Please help! I'm so close to giving up and doing something else or even going to another engine!!