moveBy
@zylem/game-lib / actions / moveBy
Function: moveBy()
moveBy(
opts):Action
Defined in: packages/game-lib/src/lib/actions/interval-actions.ts:89
Move an entity by a displacement over a duration. Distributes the movement as velocity each frame so physics stays in sync.
Parameters
opts
Returns
Example
entity.runAction(moveBy({ x: 10, duration: 500 }));