summaryrefslogtreecommitdiff
path: root/modules/csg/doc_classes
diff options
context:
space:
mode:
authorK. S. Ernest (iFire) Lee <ernest.lee@chibifire.com>2023-03-13 07:13:25 -0700
committerRĂ©mi Verschelde <rverschelde@gmail.com>2023-05-12 12:06:59 +0200
commit0c312c7a08cfc807de809ba281553927209b9a79 (patch)
tree5002ae592aa4fde110a68e5b92eb54d17fa8a71d /modules/csg/doc_classes
parentc8d64e8580da5bf53ccbb5790389b310d3d68e2d (diff)
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> (cherry picked from commit eaa84bc682dfb7f1f97970c7f4dfd4c6e63ba681)
Diffstat (limited to 'modules/csg/doc_classes')
-rw-r--r--modules/csg/doc_classes/CSGShape3D.xml2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/csg/doc_classes/CSGShape3D.xml b/modules/csg/doc_classes/CSGShape3D.xml
index 06f8f5a403..c29c3c789e 100644
--- a/modules/csg/doc_classes/CSGShape3D.xml
+++ b/modules/csg/doc_classes/CSGShape3D.xml
@@ -73,7 +73,7 @@
The operation that is performed on this shape. This is ignored for the first CSG child node as the operation is between this node and the previous child of this nodes parent.
</member>
<member name="snap" type="float" setter="set_snap" getter="get_snap" default="0.001">
- Snap makes the mesh snap to a given distance so that the faces of two meshes can be perfectly aligned. A lower value results in greater precision but may be harder to adjust.
+ Snap makes the mesh vertices snap to a given distance so that the faces of two meshes can be perfectly aligned. A lower value results in greater precision but may be harder to adjust.
</member>
<member name="use_collision" type="bool" setter="set_use_collision" getter="is_using_collision" default="false">
Adds a collision shape to the physics engine for our CSG shape. This will always act like a static body. Note that the collision shape is still active even if the CSG shape itself is hidden. See also [member collision_mask] and [member collision_priority].