Moving An Object With Touch
- by Arman
for(touch in iPhoneInput.touches) {
if(touch.phase == iPhoneTouchPhase.Moved || touch.phase == iPhoneTouchPhase.Began) {
transform.position = Camera.main.ScreenToWorldPoint(new Vector3 (touch.position.x, touch.position.y, 10));
}
}
I have found the above code from tutorial Moving An Object With Touch but its not working when I…