RaycastResult

RaycastResult

Structure used to get information back from a raycast.

Constructor

new RaycastResult(settingsopt)

Parameters:
Name Type Attributes Description
settings Object <optional>
Properties
Name Type Attributes Description
normal Vector3 <optional>
point Vector3 <optional>
entity Entity <optional>
distance number <optional>

Members

distance :number

The distance from the ray's origin to the impact point.

Default Value:
  • -1

entity :Entity

The Collider that was hit.

normal :Vector3

The normal of the surface the ray hit.

point :Vector3

The impact point in world space where the ray hit the collider.