API Source
Functions
delta_time!fixed_delta_time!elapsed_time!time_scale!Enums
// not documented yet for this moduleConstants
target fixed update from project.tomlTypes
RuntimeWindowScriptContextRuntime Docs
Time helpers expose frame delta and fixed-step timing for scripts.
Time Runtime API explains behavior, constraints, and practical usage so implementation decisions stay consistent across scripts and scenes.
Jump to Docs
Functions
delta_time!fixed_delta_time!elapsed_time!time_scale!Enums
// not documented yet for this moduleConstants
target fixed update from project.tomlTypes
RuntimeWindowScriptContextlet dt = delta_time!(ctx.run);with_node_mut!(ctx.run, Node2D, ctx.id, |node| { node.position.x += 220.0 * dt;});Use delta time in on_update for frame-rate independent motion.
Use fixed timing with on_fixed_update for deterministic physics-style work.
Store time values before entering ctx.run borrow closures.
Project fixed update target comes from project.toml runtime settings.
Related Docs