Determine the visibility for a line of sight

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

Image of line of sight

How to use the sample

  1. Open LineOfSight level.
  2. Click on ArcGISMapActor in the Outliner.
  3. Set your API key in the Details panel.
  4. Click play and see the line color change to red if there is any object obstructing the sight.

How it works

  1. Have an ArcGIS Map with the mesh collider enabled.
  2. Have a camera with the ArcGIS Camera Component attached for the area.
  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).
  4. The moiving object's path is defined by Spline Components.
  5. The LineOfSignt Actor looks for an instance of the WayPoints Actor and performs a line trace between them at each frame.
    • Any actors that unintentionally intersect the trace can be added to the Actors to Ignore of the line trace in the LineOfSignt Actor blueprint.
    • The visual cue for the line of sight changes its color depending on whether the line trace hits the target object or not.

About the data

Building models for New York are loaded from a 3D object scene layer hosted by Esri.

Elevation data is loaded from the Terrain 3D layer hosted by Esri.

Tags

line of sight, raycast, visibility, visibility analysis

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.