Skip to content

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.

number

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())
)
})
}