summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-10-13 11:43:58 +0200
committerGitHub <noreply@github.com>2021-10-13 11:43:58 +0200
commit4d2c82ef77fafc1a146e1cb46eb99efb68de2453 (patch)
tree1223039b54a2b239b2b0104e23a90786d5e99011 /editor
parent9e05f80dae337202447561d9f412645e2c877d84 (diff)
parent7a3d0b79b4199aa3bf261155385c4d71c80a139c (diff)
Merge pull request #53727 from Calinou/3d-editor-tweak-object-snap-distances
Diffstat (limited to 'editor')
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index ea6ef8ab84..8600ef3ae8 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -3863,7 +3863,7 @@ void Node3DEditorViewport::assign_pending_data_pointers(Node3D *p_preview_node,
}
Vector3 Node3DEditorViewport::_get_instance_position(const Point2 &p_pos) const {
- const float MAX_DISTANCE = 10;
+ const float MAX_DISTANCE = 50.0;
Vector3 world_ray = _get_ray(p_pos);
Vector3 world_pos = _get_ray_pos(p_pos);
@@ -6469,7 +6469,7 @@ void Node3DEditor::snap_selected_nodes_to_floor() {
// We add a bit of margin to the from position to avoid it from snapping
// when the spatial is already on a floor and there's another floor under
// it
- from = from + Vector3(0.0, 0.2, 0.0);
+ from = from + Vector3(0.0, 1, 0.0);
Dictionary d;
@@ -6485,7 +6485,7 @@ void Node3DEditor::snap_selected_nodes_to_floor() {
Array keys = snap_data.keys();
// The maximum height an object can travel to be snapped
- const float max_snap_height = 20.0;
+ const float max_snap_height = 500.0;
// Will be set to `true` if at least one node from the selection was successfully snapped
bool snapped_to_floor = false;