Lights gd5 shadows

Lo que quiero agregar a mi juego es que cuando un objeto no reciba luz directamente, no se muestra a menos que la luz emitida por el jugador la reciba directamente, ¿alguien sabe cómo?

I’m sorry, the google translator is very bad, here the text is Spanish in case you didn’t understand very well
Lo que quiero agregar a mi juego es que cuando un objeto no reciba luz directamente, no se muestre a menos que la luz emitida por el jugador la reciba directamente, ¿alguien sabe cómo?

you could use raycasts from player to light obsticle with light radius distance.
repeat for each instance of object:
set variable visable = 0
raycast objects Variable visable = 1

Visable = 0 → hide object
Visable = 1 → show object

here you can see that kind of raycast i am talking about.