Creates a new Ray instance. The ray is infinite, starting at a given origin and pointing in a given direction.
// Create a new ray starting at the position of this entity and pointing down
// the entity's negative Z axis
const ray = new pc.Ray(this.entity.getPosition(), this.entity.forward);
Readonly
directionThe direction of the ray.
Readonly
originThe starting point of the ray.
An infinite ray.