stride3d / stride3d/stride

BepuConfiguration.NewInstance - inconsistent behaviour

Open
#3,175 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area-Physics bug
Dominant language
C#
Stars
7.8k
Forks
1.2k
Avg merge
2d 17h
Merged PRs (30d)
49

Description

Release Type: Release

Version: 4.3.0.2507

Platform(s): All

Describe the bug
If BepuConfiguration isn't added to game settings, it will be created at runtime. However, this behavior can differ:

  • If the game settings asset exists -> configuration has no simulations, so nothing works
  • If the game settings asset does not exist (code-only) -> configuration has a single simulation with default values

Having the latter always be the case would reduce a lot of confusion for users that didn't read the manual.

To Reproduce

  1. Create a new project
  2. Add some physics objects
  3. Observe that physics don't work and there's a warning that there are no simulations
  4. Delete the game settings asset
  5. Set the graphics compositor and scene manually
  6. Physics works

Expected behavior
A single simulation is added no matter if the game settings asset exists or not

Contributor guide

Open the contributing guide

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.

Research direction

Start at BepuConfiguration.NewInstance and reproduce the behavior with and without the game settings asset using the listed steps. Trace how the configuration is initialized in each case; done means both paths create one simulation with default values and physics works consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
game-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.