How do I add the accelerometer in my game for Android ?

0 favourites
  • 4 posts
From the Asset Store
Add SubRip (SRT) subtitles to your videos in Construct 3
  • Hello , I wanted to ask how I can add the accelerometer to my project of a android game.

    Among the various methods of input in construct 2 I found muouse keyboard , touch and other things, but not the accelerometer and other sensors .

    Thanks a lot.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Accelerometer can be found as expressions in the Touch plugin

    You want to compare the values of AccelerationX, AccelerationY, AccelerationZ or AccelerationXWithG, AccelerationYWithG, AccelerationZWithG or still Alpha, Beta, Gamma to see in what axis the device is being rotated/turned/etc...

    You likely should use the "Compare two values" system condition to do so.

    Not all devices actually do allow browsers/HTML5 technology to take advantage of the accelerometer, so be sure to check on your device.

  • Thanks to a friend very much.

    I was able to add the accelerometer , but now I need to import as apk file to test on my smartphone .

    Do you know if and how you can do?

    Many thanks.

  • This blog article all the informations and links on how to currently export to mobile with Construct 2.

    Note: You need to own a valid C2 license to follow those steps. Otherwise, just forget about mobile and focus on HTML5 development.

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