How do I work with accelerometer

Get help using Construct 2

Post » Thu Oct 08, 2015 5:57 pm

Message: theborges is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?
Hello! I am having a problem with the accelerometer. Can you guys help me, please?

The project is: i got a couple of pieces (like tangram) and i want them to be dragged and dropped as you wish, and when you got tired of what you pictured, you press a button to "unplug" them and make them fall over with the gravity. On my computer, its working pretty fine. But on mobile devices, when the pieces are "unplugged", i want to make them move as you tilt the device.

On my smartphone (Galaxy S4) its working pretty fine, but on my tablet (Tab 4) the pieces act as one misterious force push them to a direction and thats it - the tilt doesnt work!

I am using the structure:
B
4
Posts: 3
Reputation: 206

Post » Thu Oct 08, 2015 6:03 pm

Ah, sorry, didnt know i could not post urls.

So, the structure i am using is:

-On mobile devices
--Beta Orientation > 5 and Gamma Orientation > -15 =====> Move 250*DT pixels at angle 315
--Beta Orientation < 5, Beta Orientation > -5 and Gamma Orientation > -15 =====> Move 250*DT pixels at angle 270
--Beta Orientation < -5 and Gamma Orientation > -15 =====> Move 250*DT pixels at angle 225

and goes on...

Anyone got any tutorial/video tutorial to explain how accelerometer works and how to build a properly object?

Tyvm.
B
4
Posts: 3
Reputation: 206


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 17 guests