its probably an easy question but i need to make this code run so the tilt controls make my object move faster , probably like 3x faster
public class playertilt : MonoBehaviour {
int speed = 5;
Rigidbody rb;
// Use this for initialization
void Start ()
{
rb = GetComponent();
}
// Update is called once per frame
void Update ()
{
rb.AddForce(-Input.acceleration.x, 0, -Input.acceleration.z);
}
}
↧