Skip to content

PhysicsObject physics state update fix#142

Closed
SoloByte wants to merge 5 commits intomainfrom
physics-object-physics-state-update-fix
Closed

PhysicsObject physics state update fix#142
SoloByte wants to merge 5 commits intomainfrom
physics-object-physics-state-update-fix

Conversation

@SoloByte
Copy link
Collaborator

@SoloByte SoloByte commented Jan 16, 2026

Previously the PhysicsObject and CollisionObject would update their state in the open update function even if fixed physics framerate is enabled. The PhysicsObject would update the internal physics state in the normal Update() function instead of the FixedUpdate() function and the CollisionObject would update all the colliders in the Update() function instead of the FixedUpdate() function.

This PR introduces new FixedMode and FixedStep properties in the GameTime class, so that every function always knows if the fixed framerate system is enabled and if the current GameTime instance holds fixed or open timing information.

This PR also includes some fixes in some of the Example scenes that do not properly make use of FixedUpdate(). For instance because of this I found out that the EndlessSpaceExampleScene updates the collision handler twice in each frame instead of only once!

  • New FixedMode/FixedStep GameTime properties added.
  • Update loop refactored to use new GameTime properties.
  • ExampleScenes fixed/updated.

@SoloByte SoloByte mentioned this pull request Jan 19, 2026
6 tasks
Added warning to EndlessSpaceCollision about current bug of updating CollisionHandler twice each frame.
@github-project-automation github-project-automation bot moved this from Active to Done in Shape Engine Roadmap Jan 21, 2026
@SoloByte SoloByte deleted the physics-object-physics-state-update-fix branch January 21, 2026 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

CollisionObject and PhysicsObject do not use fixed update for updating state when FixedPhysicsFramerate is enabled.

1 participant