Download

destroy object on mouse click

Hello
i have a wall that spawns object to me and a wall that if the objects hit are destroyed
if i hit the mouse button i want to get the place that i hit on the destroying wall and check if i go, for example on the X axis from the destroying wall to the spawning wall, the first object i hit and if so destroy it, if not do nothing
is there a way to do that with out shooting something from point of clicking to the spawn wall?
hope this question is clear
thank you