Orientation sensor not working

I’m making a game and I’m trying to use the orientation sensors. I activated the sensor and put if orientation alpha is less than 60 simulate pressing left and if orientation alpha is greater than 120 simulate pressing right. But when I put the game on my sisters phone (a galaxy s3) and turned it, the player didn’t move. does anyone know how to fix this?


I had the same problem.
My best quess is that the android build of gdevelop doesn’t include permissions, which means your phone doesn’t allow the sensors to be used.
I did actually find a way to test my game. If you create a version on the internet and open it with google chrome (google chrome does have permission to use the sensors) it works.
And I suppose that once you have published and downloaded the game via the playstore, you can use them.
(For those who wondered why vibrations didn’t work, it’s the concept)

I’m not really experienced (So I don’t know for certain that what I just said is true), but this is what I found out after a little bit of research.

Other potential solutions: The phone is too old (but I don’t think it is) or there must be a way to ask for permissions using the manual cordova export (As I said: I’m inexperienced, but if your good at coding there must be a solution)

Hopefully, it is useful


1 Like

I don’t know how work build with cordova but @arthuro555 know it i think, add an premission in cordova manifest is working for this the issue ?
The last time i have tested the orientation was working :confused: