Hi, every one
I want to make simple roll ball game in android.
I have a script but it can only use x axis to roll ball using accelerometer.
can you help me too roll ball in two axis.
here’s the code…
function Update () {
var dir : Vector3 = Vector3.zero;
dir.x = -Input.acceleration.y*.5;
transform.position.x += dir.x;
}
Thanx