so im making this game where when you touch light you die. i could just use a collider where its needed, but there are several times where there are moving platforms, that cast shadows, and it will be really time consuming if i where to move them one by one. so i thought there might be a way to kill the player, when hit by light.
btw, i’m very new to unity, so please don’t give any advanced answer.
Not sure if this is the best way… there might be built in methods for detecting if an obj is touching light, but you could use rays, if you draw a ray from the source to the player, limit it to the distance of the light, if there is nothing in between then they player is in the light… may need multiple rays…