aboutsummaryrefslogtreecommitdiff
path: root/tools/editor/plugins/path_editor_plugin.cpp
diff options
context:
space:
mode:
authorBen Hickling2016-11-14 14:46:08 +0000
committerRémi Verschelde2016-11-15 08:44:53 +0100
commit601f056b6f69eed047edeb3293dae86a06714b03 (patch)
tree3d6522267f4944fc7dd14e48def4f1b44072584f /tools/editor/plugins/path_editor_plugin.cpp
parent14b46c426312add13f0c6253ec4c58505e7a6fab (diff)
downloadgodot-601f056b6f69eed047edeb3293dae86a06714b03.tar.gz
godot-601f056b6f69eed047edeb3293dae86a06714b03.tar.zst
godot-601f056b6f69eed047edeb3293dae86a06714b03.zip
Diffstat (limited to 'tools/editor/plugins/path_editor_plugin.cpp')
-rw-r--r--tools/editor/plugins/path_editor_plugin.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/editor/plugins/path_editor_plugin.cpp b/tools/editor/plugins/path_editor_plugin.cpp
index 33ef71efa..258e92dc4 100644
--- a/tools/editor/plugins/path_editor_plugin.cpp
+++ b/tools/editor/plugins/path_editor_plugin.cpp
@@ -103,6 +103,12 @@ void PathSpatialGizmo::set_handle(int p_idx,Camera *p_camera, const Point2& p_po
if (p.intersects_ray(ray_from,ray_dir,&inters)) {
+ if(SpatialEditor::get_singleton()->is_snap_enabled())
+ {
+ float snap = SpatialEditor::get_singleton()->get_translate_snap();
+ inters.snap(snap);
+ }
+
Vector3 local = gi.xform(inters);
c->set_point_pos(p_idx,local);
}