godotengine / godotengine/godot
CSG collision is broken
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
-tested in 4.3 stable, 4.2.2 stable, partially tested in 4.4 dev 3
### System information
Windows 10
### Issue description
CSG collision gives all sorts of inconsistent results or no results at all: collision tests starting inside CSG shapes do not show a result with both ray cast and shape cast and using the nodes and by code. Collision tests starting from outside CSG shapes work with raycast and shapecast nodes, but not by code. Replace the CSG with a staticmesh box and everything works fine.
BTW I don't know what you guys did to godot, but I blue screened 5 times while trying to test this in 4.3 and 4.4, I'm not able to fully test all combinations of CSG and physics tests any further due to blue screens. I'm still on 4.2.2 because of regressions in 4.3 and onward.
### Steps to reproduce
Open the minimal reproduction project and hit run, see the printed results. Move the CSG shape in the -z direction by 2 meters and hit run, see the results. Replace the CSG with a staticmesh box at the origin and hit run, see the results.
### Minimal reproduction project (MRP)
[csgcollisiontest.zip](https://github.com/user-attachments/files/17369944/csgcollisiontest.zip)
Contributor guide
Research direction
Start by opening csgcollisiontest.zip and running the minimal reproduction project as described. Compare CSG collision results for raycast and shapecast nodes and code, with tests starting inside and outside the shape, then compare them with the static mesh box. Done means these collision paths produce consistent results for the reported positions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100