moveTo
@zylem/game-lib / actions / moveTo
Function: moveTo()
moveTo(
opts):Action
Defined in: packages/game-lib/src/lib/actions/interval-actions.ts:141
Move an entity to an absolute position over a duration. Calculates displacement from the entity's position on the first tick.
Parameters
opts
Returns
Example
entity.runAction(moveTo({ x: 0, y: 10, z: 0, duration: 2000 }));