Skip to content

@modoki/engine / index / setLinvel2D

Function: setLinvel2D() ​

setLinvel2D(world, entity, x, y, wakeUp?): boolean

Set linear velocity directly (world units/s) — the intuitive "move at this speed" control.

Parameters ​

world ​

World

entity ​

Entity

x ​

number

y ​

number

wakeUp? ​

boolean = true

Returns ​

boolean

Built with Modoki.