API

Function setPhysicsTimestep

  • Sets the fixed simulation timestep used by each world step, in seconds.

    Pass 0 to make the world step at the real per-frame delta instead of a fixed step. See setPhysicsTimestepMs for the millisecond-based equivalent.

    Parameters

    • world: PhysicsWorld

      The physics world.

    • dt: number

      Fixed step in seconds (e.g. 1 / 60), or 0 to use the frame delta.

    Returns void