Raycast 360, how to

Hi! how to make a raycast around yourself, 360 degrees?

Here’s my old light example. To create it, I used a 360 degree raycast, I think this will be useful to you.


WOW, you are a genius. I don’t really understand how you handle the gradient.
You create the light effect with 1 row !!! OMG
Help me to undersatnd, why the raycast sprite change intensity ?

You create 360 raycast (1 for each angle). Than, for each frame, for each raycast sprite you use this row:

You create a virtual line (raycast) from the light to all 360 grades . Than store the position of obstacle (if it is collided). Then you move the raycast sprite from the collision point to the light .
But…why the opacity change ? I’m going crazy.

1 Like

It’s just a layer effect :slight_smile: Turn off the effect and you will understand why the intensity is changing)

great idea to use the effect on the layer.


Very interesting. Thanks!