This code makes the directions reversed (it makes it so when you tilt it right it goes left and vice versa) :
using UnityEngine;
using System.Collections;
public class Accelerometer : MonoBehaviour {
//Update is called once per frame
void Update ()
{
if ( Application.platform == RuntimePlatform.IPhonePlayer)
{
float x = iPhoneInput.acceleration.x;
transform.Translate(x,0,0);
}
else
{
float x = Input.GetAxis("Horizontal");
transform.Translate(x,0,0);
}
}
}
Can anyone help?
I also need help with making an object jump, then fall back down.
Thank you!