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

setCollider

setCollider(authority, entity, changes, setColliderOptions?): void

Changes one of entity’s colliders in place on the world authority decides for: its shape, offset, rotation, material, trigger flag, layer or mask. The body keeps its handle, its velocity and the pairs it holds; the change streams, and what rested on the collider wakes where the change could leave it unsupported.

Parameter Type
authority EntityAuthority
entity Entity
changes ColliderChanges
setColliderOptions SetColliderOptions

void

setCollider(step, door, { trigger: true }); // walked through, still there