Light Trough Walls (2 sided Materials and Thick Geometry)

Hi there.

In advance thanks for helping me figure this one out

I have a sidescroller project where I’m simulating a laser pointer out of a gun. My approach was to create a cone light with a high intensity and a very extreme low outer cone angle attached to my gun.

The purpose is to show the player where he’s aiming, the problem is the light is penetrating trough walls, even when the light is “casting shadows”, the geometry is thick, they have a “two sided” material, and have “cast two sided shadows” checked.

How exactly i could make the light just hit the closest object and NOT keep illuminating trough it? My thought is that is not casting shadows at all. But i can’t figure out why.

I attached screenshots of the effect and the light settings.

Again thanks for the help.