setLinearVelocity
setLinearVelocity<
Target>(authority,entity,velocity):BodyRefusal|null
Sets a dynamic body’s velocity, in metres a second, at once. Wakes a sleeping body. Returns null, or in a deployed world the reason it refused.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
Target extends Entity |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
authority |
EntityAuthority |
entity |
BodyTarget<Target, Dynamic> |
velocity |
Vector3Like |
Returns
Section titled “Returns”BodyRefusal | null
Example
Section titled “Example”setLinearVelocity(step, ball, new Vector3(0, 0, 0)); // stopped dead