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

isTouching

isTouching(source, entity, options?): boolean

Whether any of entity’s colliders overlaps, or lies within 2 cm of, a collider the filter meets, or the one entity other names, which it meets even as a trigger: so a character standing on lava touches it, though her capsule floats a centimetre above. What a predicted system asks, which reads no contact or trigger event: a re-run steps no world. False for an entity whose body is not built yet.

Parameter Type
source QuerySource
entity Entity
options IsTouchingOptions

boolean

if (isTouching(step, character, { collisionMask: [hazards.collisionLayers.lava], includeTriggers: true })) burn(character);