A simple dynamic Line of Sight/Field of View implementation

Hi all,

I’ve been trying to follow Fog of War tutorials online to achieve similar mechanics, however, I find them a bit hard to understand, as I come from gameplay programming background, not engine or graphics. So I put a little effort to research and do it on my own.

I was so thrilled that I was succeeded, and I am eager to share it with the community (maybe someone out there was struggling with the very same problem just like me?). This is a short GIF showing the result:
[SPOILER]
https://giant.gfycat.com/DisastrousGrandAmericanindianhorse.gif

[/SPOILER]

I’ve put all the steps needed to achieve the effect in a tutorial post on my website: http://tongtunggiang.com/blog/2017/1…real-engine-4/

If you are too lazy to read the post, this is a short summary: the solution relies on line tracing technique to build a mesh procedurally. I believe the logic can be applied using Blueprint, as I did with C++.

In case you need a sample project, I’ve put it on my GitHub: GitHub - tongtunggiang/LineOfSightUE4: My implementation of Line Of Sight mechanism in Unreal Engine 4

What do you think about my solution? I am very open to suggestions to make this better and better.

Thanks in advance,
.

Looks very cool. Thanks for sharing!