Line of Sight
Line of Sight
The visuals are made up of 3 images:
Background Image (behind player)
Foreground Image (in front of player)
Gray darkened overlay (masked based on line of sight)
The platforms are hand edited shapes drawn around the visual elements. Foreground elements can be used to hide
Line of sight vision cone is built by measuring the angle from the player to the platform points. Angles are sorted, iterated over, and intersections with platforms are stored. A new polygon is built using this data and used to mask out the overlay.
Editing mode for defining platforms.