Hello guys I have a very simple problem here:
var x = Input.touches[0].deltaPosition.x * rotateSpeed * Time.deltaTime;
its a line of a code that orbits around my character, but it throws the error “index out of range”, I figured out that it was because Input.touches[0] can be exceeded but how can I prevent my code from doing that?
something like: if(Input.touchCount > 0){here something}
probably?