why cant I get android accelerometer working in two planes?

Ive searched high and low to no avail!
Im New to unity and as such am experimenting using android accelerometer to roll a sphere around my phone display. I found some code that seems to work for others, but for me I only get tilt in z axis (wrt display, x axis wrt main camera) but I require tilt motion control for left, right, back and forth.
Probably something really simple i’ve overlooked, so feeling foolish in anticipation…

Any help will be greatly appreciated!

Here is essentially the code im using;

Vector3 dir = Vector3.zero ;
dir.x = - Input.acceleration.y ;
dir.z = Input.acceleration.x ;
if ( dir.sqrMagnitude > 1 )
dir.Normalize();
dir *= Time.deltaTime;
transform.Translate ( dir * speed );

http://forum.unity3d.com/threads/roll-a-ball-with-android.184656/

Ok I found this: StarTrooper | Tutorial Projects | Unity Asset Store and with some tweaking it does what I need! :slight_smile: