Collide with projection

In my game there will be an object that project a symbol on the wall to interact with it how can i do this in a way that only the object being hit by the projection will be affected any help would be greatly appreciated.

raycasting: use it with the projection to collide with what the projection collides with code the effects of this accordingly