API Reference

Class List

pc.RaycastResult

Object holding the result of a successful raycast hit

Summary

Properties

entityThe entity that was hit
normalThe normal vector of the surface where the ray hit in world space.
pointThe point at which the ray hit the entity in world space

Details

Constructor

RaycastResult(entity, point, normal)

Create a new RaycastResul

Parameters

entitypc.EntityThe entity that was hit
pointpc.Vec3The point at which the ray hit the entity in world space
normalpc.Vec3The normal vector of the surface where the ray hit in world space.

Properties

pc.Entityentity

The entity that was hit

pc.Vec3normal

The normal vector of the surface where the ray hit in world space.

pc.Vec3point

The point at which the ray hit the entity in world space