Skip to content

format

typescript
new Ray ((origin?, direction))

description

Create a ray starting from the origin point and going in the direction specified by the direction vector.

parameter

param_nametypedescription
origin?Vector3
directionVector3The direction in which the ray is emitted.

code example

typescript
 const ray = new Ray(new Vector3(0, 0, 0), new Vector3(0, 0, 1));