Rayclass

A struct describing an origin and direction

objectRay
Namespace
global
Assembly
Sandbox.System
Declaration
public sealed struct Ray

Constructors1

Showing 1 constructors

Methods3

Showing 3 methods

public Vector3 Project(float distance)PUBLIC

Returns a point on the ray at given distance.

ParameterTypeDescription
distancefloatHow far from the `Ray.Position` the point should be.
Returns:Vector3The point at given distance.

public Ray ToLocal(Transform tx)PUBLIC

Convert a ray to be local to this transform

ParameterTypeDescription
txTransform
Returns:Ray

public Ray ToWorld(Transform tx)PUBLIC

Convert a ray from being local to this transform

ParameterTypeDescription
txTransform
Returns:Ray

Properties2

Showing 2 properties

public Vector3 Ray.Forward { get; set; }PUBLICGETSET

Direction of the ray.

Returns:Vector3

On this page