Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

castCoverRay

castCoverRay(source, coverTest): RayHitResult | null

The first cover a shot’s ray meets within its range, as castRay meets it: the ground, the map’s edge walls, a scatter hull or any body, fixed or moving, in a layer of coverMask, named by its entity; null where the line is clear, and in a world with no physics. The target and those the shot passes through are never cover in front of themselves. Through a world, each body stands where the world’s last step left it, so a room judges a rewound shot against a moving prop at its present. Pooled, as castRay’s result is.

Parameter Type
source QuerySource
coverTest CoverTest

RayHitResult | null