Nexus S, accelerometer.

Hello, all.
I have a question.
I have this basic script of a marble game (down here).
var xForce : float = 10; var yForce : float = 10; var zForce : float = 10;

function Update () {

if (Input.GetKey ("up"))
    rigidbody.AddForce(Vector3(0, 0, 10));

if (Input.GetKey ("right"))
    rigidbody.AddForce(Vector3(10, 0, 0));

if (Input.GetKey ("down"))
    rigidbody.AddForce(-Vector3(0, 0, 10));

if (Input.GetKey ("left"))
    rigidbody.AddForce(-Vector3(10, 0, 0));


But i really have any experience with the accelerometer.
How does an accelerometer thing start?
Is it like: Input.accelerometer or something?
Anyone know how to do this?
Ty, already.

If you check out the iPhone Roll-a-Ball demo, that seems like exactly what you need.

As for how to poll for Input.acceleration values… there’s a succinct script on the manual page

for left right movement use, dont use this inside if condition it will directly check your movments.

rigidbody.AddForce(Vector3(10*Input.acceleration.y, 0, 0));