Skip to content

Commit f228a84

Browse files
tTakeda09Jade-JadeHavr757
authored
Line of sight readme improvements (#27)
* Update readme * reduce the image size * Apply suggestions from code review Co-authored-by: Jade Huang <jadehuang@esri.com> * Apply suggestions from code review Co-authored-by: Andy Ren <aren@esri.com> Co-authored-by: Jade Huang <jadehuang@esri.com> Co-authored-by: Jade Huang <jadehuang@esri.com> Co-authored-by: Andy Ren <aren@esri.com>
1 parent 2c067ae commit f228a84

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed
-193 KB
Loading

sample_project/Content/SampleViewer/Samples/LineOfSight/readme.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,30 @@
1-
# Line of sight
1+
# Determine the visibility for a line of sight
22

33
Determine if the line of sight is obstructed by any object in the scene.
44

55
![Image of line of sight](LineOfSight.jpg)
66

7+
## How to use the sample
8+
9+
1. Open **LineOfSight** level.
10+
2. Click on **ArcGISMapActor** in the **Outliner**.
11+
3. Set your API key in the **Details** panel.
12+
4. Click play and see the line color change to red if there is any object obstructing the sight.
13+
714
## How it works
815

9-
1. Ensure the box for **Enable Mesh Colliders** on the `ArcGIS Map View` component of `ArcGIS Map Actor` is checked.
10-
2. Add a `Line of Sight` and a `Way Points` actor to the scene and place them at the desired locations.
11-
3. Modify the `Path Spline` component of the `Way Points` actor to define the path that the target object is moving along.
12-
4. The `Line of Sight` actor looks for an instance of `Path Splnie` at `Begin Play` and performs a line trace between them at each frame.
13-
5. Any actors that unintentionally interfere with the trace can be added to the `Actors to Ignore` argument of the line trace in the `Line of Sight` blueprint.
14-
6. The visual cue for the line of sight changes its color depending on whether the line trace hits the target object or not.
16+
1. Have an ArcGIS Map with the [mesh collider](https://developers.arcgis.com/unreal-engine/maps/mesh-collider/) enabled.
17+
2. Have a camera with the [**ArcGIS Camera Component**](https://developers.arcgis.com/unreal-engine/maps/camera/#arcgis-camera-component) attached for the area.
18+
3. Have an Actor for checking line of sight (**LineOfSight** Actor) and another for defining the path that the target object is moving along (**WayPoints** Actor).
19+
4. The moiving object's path is defined by [Spline Components](https://docs.unrealengine.com/5.0/en-US/blueprint-spline-components-overview-in-unreal-engine/).
20+
5. The **LineOfSignt** Actor looks for an instance of the **WayPoints** Actor and performs a [line trace](https://docs.unrealengine.com/5.0/en-US/BlueprintAPI/Collision/LineTraceByChannel/) between them at each frame.
21+
- Any actors that unintentionally intersect the trace can be added to the `Actors to Ignore` of the line trace in the **LineOfSignt** Actor blueprint.
22+
- The visual cue for the line of sight changes its color depending on whether the line trace hits the target object or not.
1523

1624
## About the data
1725

1826
Building models for New York are loaded from a [3D object scene layer](https://tiles.arcgis.com/tiles/z2tnIkrLQ2BRzr6P/arcgis/rest/services/New_York_LoD2_3D_Buildings/SceneServer/layers/0) hosted by Esri.
1927

20-
WorldElevation3D/Terrain3D
2128
Elevation data is loaded from the [Terrain 3D layer](https://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer) hosted by Esri.
2229

2330
## Tags

0 commit comments

Comments
 (0)