Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Bepu Physics: MaxStepPerFrame does not bound steps per frame, and -1 stops the simulation from advancing

Open Beginner friendly
#3,522 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@Nicogo1705 is already working on this.

Since Oct 7, 2026.

  • #3524 by @Nicogo1705 — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
80/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
csharp
Domain
game-dev

Research direction

Start at the loop in sources/engine/Stride.BepuPhysics/Stride.BepuPhysics/BepuSimulation.cs#L734 and check how its condition combines stepCount with MaxStepPerFrame. Verify the loop respects the configured limit and that -1 allows the simulation to advance.

Written by the indexing model from the issue text.

Description

bug

Release Type: GitHub

Version: 5cefe91c1a13d91154a696352147340ff6fb77fe

Describe the bug
sources/engine/Stride.BepuPhysics/Stride.BepuPhysics/BepuSimulation.cs#L734

for (int stepCount = 0; _remainingUpdateTime >= FixedTimeStep &&
     (stepCount < MaxStepPerFrame || MaxStepPerFrame != -1);
     stepCount++, _remainingUpdateTime -= FixedTimeStep)

Because MaxStepPerFrame does not change during the loop, the second operand
does not depend on stepCount, and the guard reduces to the value of
MaxStepPerFrame:

  • Any value other than -1 (including the default 3): MaxStepPerFrame != -1
    is true, so the guard is true for every stepCount. The number of steps taken
    in one Update call is not bounded by MaxStepPerFrame at all.
  • -1: stepCount < -1 is never true (stepCount starts at 0) and
    MaxStepPerFrame != -1 is false, so the loop body never executes and the
    simulation does not advance.
Dominant language
C#
Stars
7.8k
Forks
1.2k
Avg merge
1d 6h
Merged PRs (30d)
76

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from stride3d/stride

All issues in stride3d/stride

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.