How do I use the accelerometer

0 favourites
  • 5 posts
  • Hey,

    I have this game where I need to move around with the player with no touch controls, only by tilting the device.

    A good example that I could think of is dark nebula, as it moves in all directions.

    How can I make that please? I saw a lot of answers in the forum, but non seems to be working...

    Regards,

    Andrei

  • You might want to check to make sure you device can access Alpha, Beta, and Gamma. I have an iPad 1 that I was trying to get the compass and tilts to work on an HTML5 export, and I couldn't get them to work. As it turns out Safari on an iPad 1 running iOS 5.something is unable to access Alpha, Beta, and Gamma.

    So just something to check...

  • Then, as the player is small, what alternative would you recommend? If I use touch, to use buttons for left, up, right, down, or to use the screen, wherever is touched it will follow the finger's direction? So if the player is at 12, 12 position and the user presses the screen at 70,70, it will copy the finger's movement and apply it to the player?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You could use gestures. (Of course that's a little harder to code)

  • I have made it work with this but it's not was I inted.

    How can I use the tilt function? Do you have any example?

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