s&box docs

public sealed struct Ray

A struct describing an origin and direction

Broader workflow and conceptual references connected to this API.

Constructors

Showing 1 constructors

Methods

Showing 3 methods

public Vector3 Project(float distance)

Returns a point on the ray at given distance.

Parameters

  • distance: How far from the `Ray.Position` the point should be.

Returns

The point at given distance.

public Ray ToLocal(Transform tx)

Convert a ray to be local to this transform

public Ray ToWorld(Transform tx)

Convert a ray from being local to this transform

Properties

Showing 2 properties

public Vector3 Ray.Forward { get; set; }

Direction of the ray.

Metadata

FieldValue
Namespaceglobal
Typeclass
AssemblySandbox.System
Doc IDT:Ray

On this page