What is this thing?

This is a quick project in Unity to help me explore a problem for Google's Foobar challenge (Bringing a Gun to a Guard Fight). If you stumble across this page and you're doing the challenge, I hope this helps you out! Note that this is not a solution; it's just a way of exploring the math of the problem visually. If you're not here for the challenge, please note that this is deliberately vague to preserve its secrecy.

Unity's WebGL integration doesn't like responsive layouts or high DPI screens, so I would recommend that you download the source and muck around with it in the editor.


Mouse over any intersection on the grid to see information about the path of the laser. You can toggle collision for the laser on both the player and the guard. Click to place a "breadcrumb" on any spot on the grid to help you keep track of which angles will constitute a valid bearing. Click on a breadcrumb to remove it.