Skip to main content

Raycast

Cast a ray and get intersections with polygons

Written by Holly Conrad Smith

Use this to test line-of-sight or find where a direction from a point first hits something, for example checking a view corridor from a balcony, or finding where a sightline first meets a neighboring building's footprint.

Category: Geometric Operations

Kind: Operation

Description: cast a ray and get intersections with polygons

Inputs

Name

Abbreviation

Type

Access

Description

origin

O

Vector

Item

the origin of the ray

direction

D

Vector

Item

the direction of the ray

features

F

Cartesian

List

the polygons to test the ray against

Outputs

Name

Abbreviation

Type

Access

Description

intersections

I

Object

List

where the ray hit, including which surface it hit and its normal direction

How to

  1. Add the Raycast node.

  2. Set "origin": a Vector, often from Vector Centroid (the center of a starting geometry) or Construct Vector (a point you're specifying by hand).

  3. Set "direction": also a Vector, often from Vector from Line (point toward another geometry), or Unit X / Unit Y / Unit Z for a fixed compass-aligned direction.

  4. Feed in the polygons to test against as "features", typically from Read Static Layer or Get Raw Features.

  5. The output lists every point where the ray crosses one of those polygons.

Did this answer your question?