Ray

open class Ray

Mathematical representation of a ray. Used to perform intersection and collision tests.

Constructors

Link copied to clipboard
constructor()
Create a ray with an origin of (0,0,0) and a direction of Vector3.forward().
constructor(origin: Vector3, direction: Vector3)
Create a ray with a specified origin and direction.

Properties

Link copied to clipboard
open var direction: Vector3
Link copied to clipboard
open var origin: Vector3

Functions

Link copied to clipboard
open fun getPoint(distance: Float): Vector3
Get a point at a distance along the ray.
Link copied to clipboard
open fun toString(): String