UI rotating on screen


Anybody know how to make a UI rotate along with the device screen, so it can automatically move from portrait to landscape?



Hello Technology,

It’s pretty easy actually, all you got to do is work with the orientation controller and the accelerometer node, like this:

You’ve to create an accelerometer node if don’t exists yet on your hierarchy (just right click and search for accelerometer in the choose painel);

After that you’ve to create an orientation controller if also don’t exist;

So the mech is simples, each state for your controller, you set on the accelerometer node like this:

In my case I just setted to each controller to my plane get a dif colour depending on landscape, portrait or inverted landscape. In your case, all you have to do is put your objects in a position in the landscape state, set then to another position in portrait state and so on. Don’t forget to put your states on the accelerometer controller.

att, Higão.


I’m having issues with this - nothing seems to work…


Could you send the project or show/explain what’s the matter?

att, Higão.


Thanks, i actually worked it out!