The action "Forward ray from active camera" does exactly what you're looking for.
The corresponding condition is "On hit".
haha, thanks a lot!