How to allow rotation

So I have a mobile app made with GDevelop and I want it to be able to rotate,
I’ve found there’s both landscape and portrait in options but I want it to behave just like any other app and allow auto rotation

Hey,

To enable auto-rotation for your app, you will need to include support for orientation sensors. This will allow your app to respond to the device’s orientation changes and behave like any other app with auto-rotation.

Hope this helps!

1 Like

Hello Daniel, thanks for replying!
But I still don’t quite have it clear I’m afraid
Could you elaborate?

Thanks again
On the article you quoted I believe this action is mentioned, does it check if the user has auto-rotation enabled?
image

Hi,

This sensors will compare the value with a refrence which your phone sensors provide. Unfortunately Gdevelop doesnt have an inbuilt feature that could directly change the phone view from landscape to portrait. That means you will have to make your own algorithm with events or by using Js. Here is a more simplified solution.

1 Like