神岛 API 文档 - ArenaPro版
    Preparing search index...

    执行射线检测的结果。包含关于射线检测及其命中的对象的信息。

    Result of performing a raycast. Contains information about the raycast and the object it hit.

    Index

    Properties

    direction: GameVector3

    射线检测的方向。

    The direction of the raycast.

    distance: number

    沿射线行进的距离。

    The distance traveled along the ray.

    hit: boolean

    如果为 true,射线检测命中了对象。

    If true, the raycast hit an object.

    hitEntity: GameEntity

    被射线检测命中的实体。

    The entity hit by the raycast.

    hitPosition: GameVector3

    射线交点的位置。

    The position of the ray intersection.

    hitVoxel: voxelId

    被射线检测命中的方块 ID(如果没有命中方块则为 0)。

    The voxel ID hit by the raycast (0 if no voxel was hit).

    normal: GameVector3

    交点处表面的法向量。

    The surface normal at the intersection point.

    origin: GameVector3

    射线检测的起点。

    The origin point of the raycast.

    voxelIndex: GameVector3

    如果命中了方块,该方块的网格坐标。

    The grid coordinates of the voxel if a voxel was hit.