User Guide (Version 1.13)

Configuring PhysX Step Constants

You can configure step constants by setting the following parameters into Physics::WorldSettings when PhysXWorld is created.

  • m_fixedTimeStep – Sets how far in time simulation is computed. If the frame time is greater than this value, it is split into equal steps using frame time / m_fixedTimeStep.

    Lower values cause longer times to complete the overall simulation for this frame. Higher values cause results that can be less stable.

    If set to 0, the simulation does not use a fixed time step, but instead uses the time between frames, which can vary.

    When the PhysX::PhysXSystemComponent creates a world, it sets m_fixedTimeStep to 1/60th of a second.

  • m_maxTimeStep – Sets the largest time step in the simulation process. This prevents instability in the simulation if m_fixedTimeStep is not set. It also prevents the simulation from taking too long.

    If the time between frames is greater than m_maxTimeStep, it is limited to this value.

    By default, this is set to 1/20th of a second.