How do I work with accelerometer

0 favourites
  • 2 posts
From the Asset Store
_______ Huge collection of metal fixtures ________
  • 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:

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)