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

HitZonesTrait

const HitZonesTrait: NumberTypedTrait<Trait<() => HitZone[]>, TraitNumberTypes<HitZone[]>>

The zones a shot may strike on the entity, in its own frame. A ray that meets a zone hits the entity even where it passes outside its body, and the nearest zone it meets names the hit: a head declared in one line is HitZones([{ name: "head", multiplier: 2, at: { x: 0, y: 1.5, z: 0 }, radius: 0.25 }]). The stream carries it, so every page tests the same shapes as the room, and the room’s history keeps it, so a shot meets the zones the shooter’s screen showed.