I’m making a puzzle game where your mouse it a light and I want to make solar panels that when you shine light on them they activate other things. I want to make it light detection so that solar panels can be activated by spotlights or point lights.
Hey @MysticGaming963!
For detecting if your actors get hit in the first place, you can perform several line traces using a for loop and add new displacements on their end locations based on the index in order to form a cone shape, and then for each of them check if the hit actor is valid and if so, check if the hit actor has the “panel” tag, for example.
For detecting the intensity, you can convert the cursor location into screen location and compare the distance between the screen location of the actor in question.
Hope this helps as a guide, but let us know if you struggle with the implementation