x


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: http://www.youtube.com/watch?v=O7sAhJ7W0F4

Any help is much appreciated :)

more ▼

asked Mar 24 '12 at 02:55 PM

Klemen gravatar image

Klemen
1 1 1 1

I also wonder about this . Any idea how to do it ?

Apr 02 at 01:42 AM Emre_sd
(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

this link should help you get started

http://docs.unity3d.com/Documentation/Manual/Input.html

just read the accelerometer section.

more ▼

answered Apr 02 at 04:00 AM

crazy_boy_02 gravatar image

crazy_boy_02
55 6 9 13

(comments are locked)
10|3000 characters needed characters left

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

more ▼

answered Apr 02 at 04:02 AM

ShinyTaco gravatar image

ShinyTaco
34 2 6

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x2458
x1953
x141
x67
x3

asked: Mar 24 '12 at 02:55 PM

Seen: 701 times

Last Updated: Apr 02 at 04:02 AM