- Home /
Question by
Supershandy · May 13, 2014 at 07:11 PM ·
javascriptraycastinputpositiontouch
Getting raycast to fire at touch position but only when second finger is on screen
Hi everyone,
I have been delving into Input.touch and managed to get my code to work when a finger is on the screen to fire a raycast to the position where my finger is.
The problem that I have is that I have an on screen joystick and the raycast still fires even when using the joystick, so i set the code up to fire only when a second finger is on screen using Input.GetTouch(1), but that fires the raycast between the two fingers rather than at the coordinates of the second finger touch.
I'm fairly new to this side of the Touch class and i'm not looking for a full code, but more of a nudge in the direction i should be going to only getbthe raycast to fire towards the position of the second finger touch.
Thanks
Comment