Line of sight

Show a line of sight between two objects. Check if the line of sight is obstructed by the ArcGIS 3D object scene layer.

Image of line of sight

How it works

  1. Check the box for Mesh Colliers Enabled on the ArcGIS Map View component.
  2. Create a parent object with an ArcGIS Location component.
  3. Create child game objects in the scene that use Transform components.
  4. Move an object around the scene so that it comes in and out of the view of another object.
  5. Add any objects that may interfere with the raycast check to the Ignore Raycast layer.
  6. Check for any obstructions between objects using the Physics.Raycast method.
  7. Use the RaycastHit.point property to determine where the line of sight from the first object collides.

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 elevation layer hosted by Esri.


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.