summaryrefslogtreecommitdiffstats
path: root/editor/plugins/polygon_3d_editor_plugin.cpp
diff options
context:
space:
mode:
authorA Thousand Ships <96648715+AThousandShips@users.noreply.github.com>2024-03-03 14:37:52 +0100
committerA Thousand Ships <96648715+AThousandShips@users.noreply.github.com>2024-05-02 10:31:13 +0200
commit308dbb8c6359589ce7411027cecd777938e40bd7 (patch)
tree80a8cf2eff0d0c1ef1e7e0913b8616e0ee4e376a /editor/plugins/polygon_3d_editor_plugin.cpp
parentf91db3dc58f1d6a0cb63d591515183b5a45cd3ba (diff)
downloadredot-engine-308dbb8c6359589ce7411027cecd777938e40bd7.tar.gz
[Core] Add scalar versions of `Vector*` `min/max/clamp/snap(ped)`
Convenience for a number of cases operating on single values
Diffstat (limited to 'editor/plugins/polygon_3d_editor_plugin.cpp')
-rw-r--r--editor/plugins/polygon_3d_editor_plugin.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/editor/plugins/polygon_3d_editor_plugin.cpp b/editor/plugins/polygon_3d_editor_plugin.cpp
index da84afc4d7..7c41093774 100644
--- a/editor/plugins/polygon_3d_editor_plugin.cpp
+++ b/editor/plugins/polygon_3d_editor_plugin.cpp
@@ -334,9 +334,7 @@ EditorPlugin::AfterGUIInput Polygon3DEditor::forward_3d_gui_input(Camera3D *p_ca
}
if (!snap_ignore && Node3DEditor::get_singleton()->is_snap_enabled()) {
- cpoint = cpoint.snapped(Vector2(
- Node3DEditor::get_singleton()->get_translate_snap(),
- Node3DEditor::get_singleton()->get_translate_snap()));
+ cpoint = cpoint.snappedf(Node3DEditor::get_singleton()->get_translate_snap());
}
edited_point_pos = cpoint;