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_name | type | description |
|---|---|---|
| origin? | Vector3 | |
| direction | Vector3 | The direction in which the ray is emitted. |
code example
typescript
const ray = new Ray(new Vector3(0, 0, 0), new Vector3(0, 0, 1));