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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
authority |
EntityAuthority |
entity |
Entity |
changes |
ColliderChanges |
setColliderOptions |
SetColliderOptions |
Returns
Section titled “Returns”void
Example
Section titled “Example”setCollider(step, door, { trigger: true }); // walked through, still there