Motion
Get Motion

ReferenceScripting APIMotionStageApicastRay

MotionStageApi.castRay

method

The first mote's body a ray from one point to another meets, next turn.

NamecastRay
Kindmethod of MotionStageApi
Called asstage.castRay(…)
As a nodeCast Ray (logic graph)
Since0.3

Syntax

castRay(    from: Place,    to: Place,    options?: { world?: "2d" | "3d" }): Promise<MotionRayHit | null>

Parameters

NameTypeDescription
fromPlaceWhere it starts
toPlaceWhere it ends
options{ world?: "2d" | "3d" }Optional. World: "2d" or "3d" (the 2D world's unless there's only a 3D one)

Returns

Promise<MotionRayHit | null>: a promise of what it met, or null.

See also

MotionRayHit