im working with android and i use the joy stick to walk around and the guy button to shoot, but i cant do them both anyone know why
Hi, In order to make the button clickable while moving with the joystick you need to manage the multi touch with TouchCount in the Update(), here a sample:
void Update()
if(Input.touchCount > 0){
for(int i = 0;i<Input.touchCount;i++){
Touch touch = Input.GetTouch(i);
if(touch.phase == TouchPhase.Began && buttonRect.Contains(new Vector2( touch.position.x,Screen.height - touch.position.y))){ // or hitTest if it's a gui texture
//here you write the code you want to execute
}
}
}
}