Skip to content

Allow access to PhysicsDirectSpaceState3D from outside the main thread - #1576

Merged
Arctis-Fireblight merged 1 commit into
Redot-Engine:masterfrom
Apeirobyte:master
Nov 2, 2026
Merged

Arctis-Fireblight merged 1 commit into
Redot-Engine:masterfrom
Apeirobyte:master

Conversation

@Apeirobyte

@Apeirobyte Apeirobyte commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Resolves #973

Summary by CodeRabbit

  • Bug Fixes
    • Requests for a physics space’s direct state are now forwarded to the physics server when made from non-main threads, rather than being rejected. This makes the same query available regardless of which thread initiates it.

@Apeirobyte
Apeirobyte requested review from a team November 2, 2026 02:17
@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between fd8a600 and 47159e0.

Files selected for processing: 1
  • servers/physics_3d/physics_server_3d_wrap_mt.h
Files with no reviewable changes: 1
  • servers/physics_3d/physics_server_3d_wrap_mt.h

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

Walkthrough

PhysicsServer3DWrapMT::space_get_direct_state now forwards calls from any thread to the wrapped physics server.

Changes

Physics server direct-state access

Layer / File(s) Summary
Forward direct-state requests
servers/physics_3d/physics_server_3d_wrap_mt.h
The wrapper no longer checks whether the call comes from the main thread before forwarding it.

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Suggested reviewers: arctis-fireblight, davetheeggman

Merge Risk: Minimal · up to 47159

The direct-state forwarding change is ready to merge after normal checks.

Pre-merge checks: Passed 4
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly and concisely describes the main change: allowing access to PhysicsDirectSpaceState3D outside the main thread.
Finishing Touches
Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@DaveTheEggman DaveTheEggman added this to the Redot 26.4 milestone Nov 2, 2026
@Arctis-Fireblight Arctis-Fireblight changed the title Address #973 Allow access to PhysicsDirectSpaceState3D from outside the main thread Nov 2, 2026
@Arctis-Fireblight Arctis-Fireblight self-assigned this Nov 2, 2026
@Arctis-Fireblight
Arctis-Fireblight merged commit b620c0f into Redot-Engine:master Nov 2, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow access to PhysicsDirectSpaceState3D from outside the main thread.

3 participants