So I have a "cannon", that shoots a laser-like ray, so instead of shooting various "bullets" it shoots only one long ray.
The "cannon" spins on its own axis. And and the ray rotates along with it, like the dials of a clock.
Now, i have some wall-like obstacles, that i want to obstruct the path of the ray.
Is there any way to do this? so that when the ray rotates on the axis of the cannon, make it not go past (in terms of radius) once it hits a wall, in the same manner that when light hits an opaque object it doesnt move through it and you have a shadow on the other side.
OR instead, how would this be done: ray is object A, and wall is object B, whenever B overlays A, intersect A's collision mask, so that the part occupied by B isnt accounted for?
hope any of this made sense.