Its not much different than raycasting.
One thing I have noticed (and not needed that long) about this forum is that people seem to assume that the game developing system can do all the *thinking* for them.
Programs and toolkits like Construct, Unity etc. help carrying a lot of the burden and eliminate the lots of tedious ground work needed compared to coding the same game with C(++) or Javascript. But they aren't (at least yet) totally automated systems that can solve *everything* one may need during game making.
So, there are still some human game making skills needed, like logic and trigonometry. And this one definitely need the trig (and some example drawings) to be solved.