diff options
author | Ben Hickling <ben.hickling@aria-networks.com> | 2016-11-14 14:46:08 +0000 |
---|---|---|
committer | Ben Hickling <ben.hickling@aria-networks.com> | 2016-11-14 14:46:08 +0000 |
commit | 4d1acab79b0e284252d1aa3fa0447f8fbc4c5a7d (patch) | |
tree | 74dcaaa2a07fcc74c0c4351507fa8c165a80bb8b /tools | |
parent | bbc71083c1616047e4ef571a25d254034c69ef33 (diff) |
Added snapping to 3D path handles to bring it in line with its 2D counterpart
Diffstat (limited to 'tools')
-rw-r--r-- | tools/editor/plugins/path_editor_plugin.cpp | 6 |
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 33ef71efab..258e92dc41 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); } |