- Home /
Question by
GamesDeveloper12 · Mar 21, 2015 at 02:59 PM ·
inputtouchmultitouchtaphold
Multitouch Hold and Move
i am developing a shooting game and want the player to be able to move the crosshair with their finger and then tap or hold another finger on the screen to shoot (tap=fire once and hold==fire constantly).
I have managed to get it so that the player can move the crosshair and tap once to shoot but cant seem to get it to allow them to hold to shoot while still moving the crosshair with their other finger.
for(int i=0; i<Input.touchCount;i++){
if(Input.GetTouch(i).phase == TouchPhase.Moved && Input.touchCount==1){
//move crosshair
}
else if(Input.GetTouch(i).phase == TouchPhase.Began){
//shoot once
}
}
Comment