Allow access to PhysicsDirectSpaceState3D from outside the main thread.
Maintainers usually reply within 1 day
@Arctis-Fireblight is already working on this.
Since Sep 14, 2026.
Assessment
This issue has not been assessed yet.
Description
Tested versions
This issue is present when using a physics engine module such as GodotPhysics or the new JoltPhysics module.
This is not an issue when using Jolt physics as a GDExtension.
System information
Windows 11
Issue description
The following code prevents access to the PhysicsDirectSpaceState3D outside of the main thread, https://github.com/Redot-Engine/redot-engine/blob/da61fa2c4549ca21d4ee13031177593280395c74/servers/physics_server_3d_wrap_mt.h#L116-L120
I don't believe this check is necessary as there is another check later that verifies that the space state is available, https://github.com/Redot-Engine/redot-engine/blob/da61fa2c4549ca21d4ee13031177593280395c74/modules/jolt_physics/jolt_physics_server_3d.cpp#L233-L239
Removing the main thread check in a custom build allows my project to work with the integrated Jolt physics module just as it does with the GDExtension version.
Steps to reproduce
Attempt a raycast from a thread or from a node running on a sub thread group.
Minimal reproduction project (MRP)
N/A
- Dominant language
- C++
- Stars
- 6.1k
- Forks
- 337
- Avg merge
- 4d 5h
- Merged PRs (30d)
- 52
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Redot-Engine/redot-engine
-
bug confirmed topic:3d topic:rendering
Difficulty 5/5 Over a week Newbie friendliness 35/100
Redot-Engine/redot-engine#1568 ·
Maintainers usually reply within 1 day
-
bug enhancement
Difficulty 3/5 1-2 days Newbie friendliness 57/100
Redot-Engine/redot-engine#1559 ·
Maintainers usually reply within 1 day
-
bug topic:3d topic:editor usability
Difficulty 3/5 1-2 days Newbie friendliness 48/100
Redot-Engine/redot-engine#1554 ·
Maintainers usually reply within 1 day
-
bug topic:animation
Difficulty 3/5 1-2 days Newbie friendliness 54/100
Redot-Engine/redot-engine#1552 · 3 comments ·
Maintainers usually reply within 1 day
-
AnimationTree does not respect AnimationPlayer's speed_scale or the AnimationClip's update modeOpenbug topic:animation
Difficulty 4/5 3-5 days Newbie friendliness 45/100
Redot-Engine/redot-engine#1551 ·
Maintainers usually reply within 1 day
All issues in Redot-Engine/redot-engine
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
cython/cython#8110 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ROCm/rocm-systems#14923 ·
Maintainers usually reply within 2 days
-
arrays asr pass bug ICE intrinsic medium priority
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Area: World-Readiness
Difficulty 1/5 Under an hour Newbie friendliness 90/100
microsoft/calculator#2522 ·
-
missing `catch.hpp`Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
microsoft/inflatelib#34 · 1 comment ·