Godot Version
4.7.stable
Question
I’m creating a 2D horror game where the player digs around a tilemap and hunts for enemies. The player has a headlamp which aims in the direction of the mouse. I want everything within the light cone to be illuminated by their edges only.
Here is a mock up of what I’m trying to describe. The only discrepancy is that the white cone emitting from the players head should not be visible in game, only the environment and the players sprite.
The silhouette on the right is an enemy, I would like to have their edges illuminated as illustrated but that feels like a whole other bag worms, so for this post the problem can just be focused on the tiles, but feel free to leave any suggestions.
I’ve looked into many approaches, one being the technique from this website: 2D Visibility
Another is the approach here: https://www.reddit.com/r/godot/comments/1etv9ug/tutorial_how_to_make_a_simple_player_line_of/
But all the posts I’ve looked at focus on 360 degree views, and I haven’t been able to figure out how to reduce it to a cone, so I haven’t even made it to the edge illumination part yet.
Any suggestions on how to approach this are appreciated, thank you!
