- Home /
Mobile joystick moving my player like the game is played in portait screen, but the game is in landscape mode.
Beginner here , dont flame me for my ignorance pls :D
So i got an working playercontroller script with mobile joystick, but the problem is that my joystick moves my character like my screen was in portrait mode. (i move joystick up, the char goes left , if i move stick down char goes right and so on) How can i make the joystick move my character correctly as the game i made is in landscape mode? .
.
.
EDIT. Hmm.. i got an idea, what if i just rotate the whole game with camera 90 degrees ? Then joystick should be moving my character just like it should... Is this a smart way to solve my problem? :D
Answer by JasonBennett · Jan 08, 2020 at 08:59 PM
Hello @Tonba,
Could you share your code? It's hard to tell what is going on (and whether your solution would work) without seeing the specific code.
As for being a beginner: you've come to the right place! Nobody on here will flame you for ignorance unless they're having a REALLy bad day / week / life.
-Jason
Hello Jason!
First i want to thank you for your kind words and will to help.
Second, i managed to fix this problem, my main camera was in 90 degree angle so my mobile controls were messed up obviously since camera viewed the game from the "side". Sad part is i spent hours and hours trying to fix this and in the end it was the most stupid thing ever.
-Toni
Sad part is i spent hours and hours trying to fix this and in the end it was the most stupid thing ever.
Haha welcome to game development my friend. You'll either spend hours fixing a thing that was actually stupidly simple, or you'll spend hours building a thing that could have been built more elegantly. And somewhere along that timeline you put out a game.
Best of luck to you and stick with it!