Merge pull request #7115 from sketchyfun/path3D_handle_snap

Added snapping to 3D path handles
This commit is contained in:
Rémi Verschelde 2016-11-15 08:17:55 +01:00 committed by GitHub
commit 635db806c4

View file

@ -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);
}