Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update snap value for precision in small scale models. #90950

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion modules/csg/csg_shape.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ class CSGShape3D : public GeometryInstance3D {

bool dirty = false;
bool last_visible = false;
float snap = 0.001;

// 0.00001 meters is equal to 0.01 millimeters. Small scale models (e.g., mechanical parts, jewelry).
float snap = 0.00001f;

bool use_collision = false;
uint32_t collision_layer = 1;
Expand Down
2 changes: 1 addition & 1 deletion modules/csg/doc_classes/CSGShape3D.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
<member name="operation" type="int" setter="set_operation" getter="get_operation" enum="CSGShape3D.Operation" default="0">
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">
<member name="snap" type="float" setter="set_snap" getter="get_snap" default="1e-05">
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">
Expand Down
Loading