Input acceleration problem

Hi all,

I’m trying to use the accelerometer to control the movement of an object. It’s pretty simple, only x axis:

transform.Translate(new Vector3(Input.acceleration.x, 0, 0));

The problem is that I’ve tried a lot of combinations and none of them work. With the above code it moves the object along the x and y axes. My app works in landscape left rotation. I’ve read that Unity automatically detects rotation so that x, y, and z are always x, y, z no matter what the rotation of the device is.

I’d really appreciate any help you can offer…

Using Translate to move an object that isn’t tagged as kinematic can lead to serious problems with physics if one isn’t cautious.

In my case, I just needed to move the object by applying a force, instead of moving it ‘manually’. That solved it.