Orientation/Tilt Feature Not working in all mobile devices?

Discussion and feedback on Construct 2

Post » Wed Jan 17, 2018 10:12 am

hi guys,
i have been working on a game for a while now, it requires tilting detection (orientation check) and it is working fine on one device (sony xperia XA) while it is not detected on other (Micromax Canvas 1),
At first i thought that the device may not have orientation detection but then i tried some other tilt games available in play store on the device and they all are working fine.
I am wondering what could be the problem then?...
B
20
S
7
Posts: 118
Reputation: 1,769

Post » Wed Jan 17, 2018 11:22 am

I looked up the specs for a Micromax Canvas 1 and it doesn't look like it has a gyroscope sensor. So it lacks the hardware to detect tilt.

I think some apps can fall back to using the accelerometer but AFAIK not all apps or browsers do this.
Scirra Founder
B
415
S
248
G
92
Posts: 25,288
Reputation: 200,960

Post » Wed Jan 17, 2018 1:03 pm

@ashley
But i just checked and games like doodle jump & temple run are working fine on micromax canvas 1
while i also searched internet to find whether they use accelerometer or gyroscope and everyone is saying that they use gyroscope and not an accelerometer.
what should i do then to make my game work on every device like temple run? ....is accelerometer my last option then?
B
20
S
7
Posts: 118
Reputation: 1,769

Post » Wed Jan 17, 2018 4:52 pm

Accelerometer and gyroscope plugs default to zero, so you can add events for both of them as well as touch controls based on that value.
A great many lower end models do not have gyroscopes, almost all smartphones have an accelerometer.
The response for the x, and y axis of the features is identical.
Image ImageImage
B
179
S
50
G
207
Posts: 8,719
Reputation: 128,306

Post » Thu Mar 29, 2018 9:35 am

i will check for which one is supported on the device and then activate groups accordingly.
Thank you everyone!
B
20
S
7
Posts: 118
Reputation: 1,769


Return to Construct 2 General

Who is online

Users browsing this forum: dogsbollox and 6 guests