Accelometer controls for iOS and android

Hello, Im working on a simple ball game for mobile devices (so it should work on both, iOS and android). But ive got no idea how to make controls using the accelometer.

Some info on what i need:

  • device is hold horizontal while playing
  • move the ball forward and back when leaning the device forward or back
  • move the camera left or right with leaning the device left or right

(like in the game Aerox, heres a video of what id like to have: - YouTube

Any help is much appreciated :slight_smile:

this link should help you get started

just read the accelerometer section.

Check out the free roll a ball scene in the asset store too.