Hi there,
Can some one tell me if I am doing something incorrectly?
I have using this code, to tap the screen. It sends a ray from this point thru the camera. Viewing the drawn ray, it is colliding or travelling thru the intended targets. However, it never registers as the ray actually hitting. I have the correct layer of the layer mask set.
void testForDummyTarget(){
print("test for dummy target ");//THIS PRINTS
Ray ray = cam.ScreenPointToRay(inputPos);
Debug.DrawRay(ray.origin, ray.direction * 100, Color.red);
if(Physics.Raycast(dummyRay, out dummyHit, Mathf.Infinity, dummyLayerMask)){
//We have hit a dummy.
print("we have locked on a target mmmm");///THIS NEVER PRINTS
}
}