noob22
1
IndexOutOfRangeException: Array index is out of range.
accelerometer.Update () (at Assets/Standard Assets (Mobile)/Scripts/accelerometer.cs:36)
Why?
system
2
well it seems, that there is no touch (Input.touches is empty). You should check the array length before you try to access elements in it:
if(Input.touches.Count > 0)
{
ray = Camera.main.ScreenPointToRay(Input.touches[0].position);
// do stuff ...
}
else
{
Debug.Log("No touches available");
}