[Solved] How do I detect the phone orientation?

Get help using Construct 2

Post » Fri Nov 07, 2014 1:56 pm

I want to make the green bar move to the left when you tilt to the left. Same applies for moving to the right.
This has to be played in Landscape orientation and it works perfectly by using the Beta orientation from the touch plugin on one phone position.
Whenever I hold the phone differently, the green bar won't work like intended.
The screen will auto rotate with you. However, the defined Beta orientation conditions won't change with the autorotate. This is troublesome.

Is there a way:
-to detect how one hold their phone?
-to lock the screen on one position to prevent auto rotate? (Holding your phone up-side-down won't rotate the screen)

I have addded a picture to make things more clear.
ikke2902
You do not have the required permissions to view the files attached to this post.
It's time for me to return the favor :)
B
32
S
9
G
9
Posts: 132
Reputation: 5,370

Post » Sun Nov 09, 2014 2:38 pm

The included 'Browser' plugin was able to fix my problem.
That plugin has an action to lock the screen orientation.
https://www.scirra.com/manual/110/browser

There are several options like Primary Orientation, Secondary orientation locks etc.
It's time for me to return the favor :)
B
32
S
9
G
9
Posts: 132
Reputation: 5,370


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 9 guests