useDeltaTime
useDeltaTime():
number
Defined in: src/std/hooks/useDeltaTime.ts:21
Returns the os.clock() time delta between the start of this and the last frame.
Returns
Section titled “Returns”number
Example
Section titled “Example”function liftAll() { query(Position).forEach((id, position) => { id.set( Position, // We use delta time to make the movement frame-independent. position.add(Vector3.up).mul(useDeltaTime()) ) })}