# Line of sight. Dynamic mesh

**URL:** <https://forums.unrealengine.com/t/line-of-sight-dynamic-mesh/158312>\
**Category:** UE Marketplace\
**Tags:** unreal-engine, fab\
**Created:** [February 23, 2021, 12:07pm UTC](https://forums.unrealengine.com/t/line-of-sight-dynamic-mesh/158312 "2021-02-23T12:07:57Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Babush61](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Babush61](https://forums.unrealengine.com/u/Babush61)\
**Post date:** [February 23, 2021, 12:07pm UTC](https://forums.unrealengine.com/t/line-of-sight-dynamic-mesh/158312/1 "2021-02-23T12:07:57Z")

</div>

Line of sight.

[![](https://i.imgur.com/GnYWgnM.png) ](https://i.imgur.com/GnYWgnM.png)

3-axis rotation: X, Y, Z  
High performance: the component is written in C ++  
Texture support: component has no UV, textures are supported in local mesh space

Marketplace link: [Here](https://www.unrealengine.com/marketplace/en-US/product/line-of-sight)

Documentation: [https://docs.google.com/document/d/1…it?usp=sharing](https://docs.google.com/document/d/10GsUARoJgJQuQD7FKA7VgaBIgitTfm6BXFc8lMrOlG4/edit?usp=sharing)

Setting options: Angle and Radius

[![](https://i.imgur.com/eI20RCT.png) ](https://i.imgur.com/eI20RCT.png)

[![](https://i.imgur.com/km36Qzo.png) ](https://i.imgur.com/km36Qzo.png)

Simple usage: For minimal use only 2 functions need to be called  
[![](https://cdn1.epicgames.com/ue/product/Screenshot/UE4EditorsDb3KeJwz72-1920x1080-a6cd0c4758d7e3091c2ca7cf549a7505.png?resize=1&w=1600) ](https://cdn1.epicgames.com/ue/product/Screenshot/UE4EditorsDb3KeJwz72-1920x1080-a6cd0c4758d7e3091c2ca7cf549a7505.png?resize=1&w=1600)

A simple way to get information about detected objects

 ![UE4Editor_ZwpOkdApbO](https://d3kjluh73b9h9o.cloudfront.net/original/3X/c/1/c1867eff1c0529d2a805a19b0a0fe1f1e75e5263.png)

An example of rotation along the Y axis. The component rotates along all 3 axes, this can be used for 2D games.

[![](https://i.imgur.com/Kp0VGD7.png) ](https://i.imgur.com/Kp0VGD7.png)

Component can be used with postprocess for pseudo lighting

 ![UE4Editor_JUhgvOZKrd](https://d3kjluh73b9h9o.cloudfront.net/original/3X/2/c/2c5c3a2d788bb4973071e7ed60d3e5e6cfef16ca.jpeg)

---

<div class="post-metadata">

**Author:** ![Babush61](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Babush61](https://forums.unrealengine.com/u/Babush61)\
**Post date:** [March 27, 2021, 11:14am UTC](https://forums.unrealengine.com/t/line-of-sight-dynamic-mesh/158312/2 "2021-03-27T11:14:51Z")

</div>

Added version for 4.25. Changed the World rotation mode in the built-in functions (now it is not World Rotation, but the Y axis moves the mesh up)  
The PostProcess2 material has been removed.

---

<div class="post-metadata">

**Author:** ![Mawiel](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mawiel](https://forums.unrealengine.com/u/Mawiel)\
**Post date:** [March 27, 2021, 3:53pm UTC](https://forums.unrealengine.com/t/line-of-sight-dynamic-mesh/158312/3 "2021-03-27T15:53:14Z")

</div>

Hey, I really like this system. Is there a way to add verticality to the mesh? I would like to have a decal material that follows the shape, so it is projected down to uneven landscapes. Any pointers on how I would modify the C++ code to achieve this?

---

<div class="post-metadata">

**Author:** ![Babush61](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Babush61](https://forums.unrealengine.com/u/Babush61)\
**Post date:** [March 27, 2021, 7:50pm UTC](https://forums.unrealengine.com/t/line-of-sight-dynamic-mesh/158312/4 "2021-03-27T19:50:31Z")

</div>

I think you know how to do this using Render Target.

[https://images-ext-1.discordapp.net/external/0gFmw2e1Ua95XAOnelH417LBJVURdPSyOoQNAyW1hAU/?width=1394&height=497/https/media.discordapp.net/attachments/825425967350677534/825437732955619358/unknown.png](https://images-ext-1.discordapp.net/external/0gFmw2e1Ua95XAOnelH417LBJVURdPSyOoQNAyW1hAU/?width=1394&height=497/https/media.discordapp.net/attachments/825425967350677534/825437732955619358/unknown.png)

If you need to rotate the mesh, then change the rotation in the transorm of the component.

---

<div class="post-metadata">

**Author:** ![Babush61](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Babush61](https://forums.unrealengine.com/u/Babush61)\
**Post date:** [April 19, 2021, 7:13am UTC](https://forums.unrealengine.com/t/line-of-sight-dynamic-mesh/158312/5 "2021-04-19T07:13:42Z")

</div>

Bugfix: after calling Stop Build Mesh and Start Build Mesh, the number of triangles increases and the translucency decreases  
Added functions:  
MeshIsBuilt - Returns true if Start Build Mesh was called  
LineOfSightIsActive - will return true if Start Line Trace was called

---

<div class="post-metadata">

**Author:** ![Babush61](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Babush61](https://forums.unrealengine.com/u/Babush61)\
**Post date:** [September 5, 2021, 9:17pm UTC](https://forums.unrealengine.com/t/line-of-sight-dynamic-mesh/158312/6 "2021-09-05T21:17:26Z")

</div>

del

---

<div class="post-metadata">

**Author:** ![Babush61](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Babush61](https://forums.unrealengine.com/u/Babush61)\
**Post date:** [November 10, 2021, 10:09pm UTC](https://forums.unrealengine.com/t/line-of-sight-dynamic-mesh/158312/7 "2021-11-10T22:09:40Z")

</div>

- Added Reverse Arc 1 option

![7P3aNijThb2](https://d3kjluh73b9h9o.cloudfront.net/original/3X/7/9/79f5672febe3a91fa2d0c8e925f2f3a2b4323a10.jpeg)

- Added two types of triangulation

- You can use Unreal Insights to measure performance.

---

<div class="post-metadata">

**Author:** ![Babush61](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Babush61](https://forums.unrealengine.com/u/Babush61)\
**Post date:** [August 2, 2022, 6:07pm UTC](https://forums.unrealengine.com/t/line-of-sight-dynamic-mesh/158312/8 "2022-08-02T18:07:25Z")

</div>

The Number Of Lines property is no longer available on the Detail Panel. Now the number of trace lines is specified in the Start Line Trace function.

---

<div class="post-metadata">

**Author:** ![sandic1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sandic1](https://forums.unrealengine.com/u/sandic1)\
**Post date:** [October 29, 2022, 3:50am UTC](https://forums.unrealengine.com/t/line-of-sight-dynamic-mesh/158312/9 "2022-10-29T03:50:29Z")

</div>

> [@Babush61](#):
>
> [https/media.discordapp.net/attachments/825425967350677534/825437732955619358/unknown.png](https://images-ext-1.discordapp.net/external/0gFmw2e1Ua95XAOnelH417LBJVURdPSyOoQNAyW1hAU/?width=1394&height=497/https/media.discordapp.net/attachments/825425967350677534/825437732955619358/unknown.png)

hi could you go into more detail on how to achieve verticality:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/6/2/962134f9332f324b1775b506c7af85d8545539b9.jpeg)

i have this with decal currently. is it possible for the mesh in your plugin to be height aware ?

---

<div class="post-metadata">

**Author:** ![Babush61](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Babush61](https://forums.unrealengine.com/u/Babush61)\
**Post date:** [October 29, 2022, 7:26am UTC](https://forums.unrealengine.com/t/line-of-sight-dynamic-mesh/158312/10 "2022-10-29T07:26:23Z")

</div>

Hi. Interesting question.  
The mesh is flat and defines enemies (objects) only that intersect the grid (or TraceLine lines if the mesh is not created). If you need to identify enemies at a different height, create several components (display only one).

About the material :  
I haven’t tried decals. I can’t answer this question.  
But, one user sent me a screenshot, he used my component and made a Scene Capture and recorded the result in the Render Target. And Render Target was used in the material.

Example Render Target and result:

[[Album] imgur.com ![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/2/0/c2074eb41d652cbb0ed20ac44f68e1b4c1469f77.jpeg "imgur.com") ](https://imgur.com/a/Z0yr7iI)

[[Album] imgur.com ![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/9/6/896ea5944c55de53f13962c5449c861a235b423f.jpeg "imgur.com") ](https://imgur.com/a/B04PRZY)

But I don’t have the details, I’m not an expert in materials.

---

<div class="post-metadata">

**Author:** ![imtrobin2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@imtrobin2](https://forums.unrealengine.com/u/imtrobin2)\
**Post date:** [January 7, 2024, 2:38am UTC](https://forums.unrealengine.com/t/line-of-sight-dynamic-mesh/158312/11 "2024-01-07T02:38:11Z")

</div>

I’m doing a SetTickEnable after I detect an actor, which I see calls StopLineTrace. However, I’m still able to get overlaps.

Also, SetTickEnable should only call StopLineTrace when is false, if it is true, it should not stop, don’t you think?

---

<div class="post-metadata">

**Author:** ![Babush61](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Babush61](https://forums.unrealengine.com/u/Babush61)\
**Post date:** [January 7, 2024, 11:22am UTC](https://forums.unrealengine.com/t/line-of-sight-dynamic-mesh/158312/12 "2024-01-07T11:22:46Z")

</div>

Yes, it’s a bug. You can use “SetComponentTickEnabled”.  
In theory it works faster than calling stop\* and start line trace. After calling “SetComponentTickEnabled” you also need to disable mesh visibility.

I couldn’t repeat it. The “StopLineTrace” function should completely disable tracing and calls of Begin and End Overlap events.

---

<div class="post-metadata">

**Author:** ![imtrobin2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@imtrobin2](https://forums.unrealengine.com/u/imtrobin2)\
**Post date:** [January 7, 2024, 1:38pm UTC](https://forums.unrealengine.com/t/line-of-sight-dynamic-mesh/158312/13 "2024-01-07T13:38:34Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/3/c/43c3ddb2dc45aef508caca5086f3dccd6fc0efb2.jpeg)

I stop Line Trace, SetComponentTickEnable false, SetVisiblity ofMesh. The breakpoint still fires.

---

<div class="post-metadata">

**Author:** ![Babush61](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Babush61](https://forums.unrealengine.com/u/Babush61)\
**Post date:** [January 7, 2024, 2:59pm UTC](https://forums.unrealengine.com/t/line-of-sight-dynamic-mesh/158312/14 "2024-01-07T14:59:02Z")

</div>

Stop Line Trace stop tracing on the next tick

---

<div class="post-metadata">

**Author:** ![imtrobin2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@imtrobin2](https://forums.unrealengine.com/u/imtrobin2)\
**Post date:** [January 8, 2024, 12:28am UTC](https://forums.unrealengine.com/t/line-of-sight-dynamic-mesh/158312/15 "2024-01-08T00:28:05Z")

</div>

Many ticks have already passed, few seconds in fact.

---

<div class="post-metadata">

**Author:** ![AvocadoCookie](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AvocadoCookie](https://forums.unrealengine.com/u/AvocadoCookie)\
**Post date:** [January 16, 2024, 12:18am UTC](https://forums.unrealengine.com/t/line-of-sight-dynamic-mesh/158312/16 "2024-01-16T00:18:38Z")

</div>

Hello, I am trying out “LineOfSight. Manual. Pseudo lighting (PostProcess)” tutorial in Unreal Engine 5.2.

When I press play, the scene gets brighter and brighter. I think the issue is coming from the post process material because when I see “M\_PostProcess1”'s preview window, it gets brighter and brighter even though Blackout value is set to “0.1”.

I currently have only default “DirectionalLight” from the engine. (Only this light makes line of sight visible as expected)

Could you suggest me what to do to not make the scene get brighter and brighter when blackout value is larger than zero?

---

<div class="post-metadata">

**Author:** ![Babush61](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Babush61](https://forums.unrealengine.com/u/Babush61)\
**Post date:** [January 16, 2024, 11:09am UTC](https://forums.unrealengine.com/t/line-of-sight-dynamic-mesh/158312/17 "2024-01-16T11:09:18Z")

</div>

Hello. Maybe I made a mistake when I wrote the manual.  
Check out the youtube version. [https://www.youtube.com/watch?v=Kxlvvz5\_GJs](https://www.youtube.com/watch?v=Kxlvvz5_GJs).  
Use the way with ZStartCloneTo nodes.  
Now I repeated the method from the video and it works.  
Most likely the error is not in the material. The error is in the settings.

---

<div class="post-metadata">

**Author:** ![SERGEYKUL](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SERGEYKUL](https://forums.unrealengine.com/u/SERGEYKUL)\
**Post date:** [January 21, 2024, 4:07pm UTC](https://forums.unrealengine.com/t/line-of-sight-dynamic-mesh/158312/18 "2024-01-21T16:07:52Z")

</div>

how to eliminate the twitching of the procedural mesh during movement?

---

<div class="post-metadata">

**Author:** ![Babush61](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Babush61](https://forums.unrealengine.com/u/Babush61)\
**Post date:** [January 21, 2024, 4:20pm UTC](https://forums.unrealengine.com/t/line-of-sight-dynamic-mesh/158312/19 "2024-01-21T16:20:38Z")

</div>

I don’t know what kind of twitching you’re talking about. Maybe you need to increase the number of mesh edges.

---

<div class="post-metadata">

**Author:** ![SERGEYKUL](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SERGEYKUL](https://forums.unrealengine.com/u/SERGEYKUL)\
**Post date:** [January 22, 2024, 1:08pm UTC](https://forums.unrealengine.com/t/line-of-sight-dynamic-mesh/158312/21 "2024-01-22T13:08:35Z")

</div>

![проблема](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/2/b/02bb7f92584015f0f463e6104b95cb02323d11f7.jpeg)

[Next page](https://forums.unrealengine.com/t/line-of-sight-dynamic-mesh/158312.md?page=2)
