godot/modules/csg
K. S. Ernest (iFire) Lee eaa84bc682
Fix CSG edge case causing intersection line to hit on common edge of 2 triangles.
The previous implementation assumed that the intersection entered or exited a
shape when it hit right on the common edge of 2 triangles. However, there is
also a case where it just "skirts" the other shape on the outside.

To fix this, we added code to check the intersection distance and if the
normals of the faces are pointed in the same direction as the intersection or
not (e.g. inner product > 0). This handles the case where the intersection
line hits the common edge of 2 triangles and skirts the other shape on the
outside.

Extended code to cover a third case.

Fixes #58637.

Co-authored-by: OldBelge <StevenGeens@users.noreply.github.com>
2023-04-27 11:39:29 +02:00
..
doc_classes Fix CSG edge case causing intersection line to hit on common edge of 2 triangles. 2023-04-27 11:39:29 +02:00
editor Add EditorUndoRedoManager singleton 2023-01-16 01:11:52 +01:00
icons Increase icon saturation by 30% for all editor icons 2021-05-11 18:15:31 +02:00
SCsub SCons: Unify tools/target build type configuration 2022-09-26 16:31:46 +02:00
config.py Disable 3D-only modules when 3D is disabled 2021-06-03 17:45:28 -04:00
csg.cpp Fix CSG edge case causing intersection line to hit on common edge of 2 triangles. 2023-04-27 11:39:29 +02:00
csg.h Fix CSG edge case causing intersection line to hit on common edge of 2 triangles. 2023-04-27 11:39:29 +02:00
csg_shape.cpp Fix CSG edge case causing intersection line to hit on common edge of 2 triangles. 2023-04-27 11:39:29 +02:00
csg_shape.h Add compatibility code for CSGBox3D width/height/depth from Godot 3.x 2023-02-13 20:41:23 +01:00
register_types.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
register_types.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00