setBody
setBody(
authority,entity,changes):void
Changes entity’s body in place on the world authority decides for:
its kind, its layer and mask, what it pushes and ignores, its mass and
the rest. The body keeps its velocity where both kinds have one, its
sleep and the pairs it holds; each change streams, and a body that a
change could leave unsupported wakes what rested on it.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
authority |
EntityAuthority |
entity |
Entity |
changes |
BodyChanges |
Returns
Section titled “Returns”void
Example
Section titled “Example”setBody(step, crate, { bodyType: RigidBodyType.Kinematic }); // picked up