Merge branch 'master' into blender2.8
[blender.git] / source / blender / editors / transform / transform_constraints.c
index 4e409e7f77f1ed66421b6d971fecd1db5961e15d..f612dc0e4749710db7ecec4878094a48b6e19990 100644 (file)
@@ -999,7 +999,7 @@ static void setNearestAxis3d(TransInfo *t)
         * of two 2D points 30 pixels apart (that's the last factor in the formula) after
         * projecting them with ED_view3d_win_to_delta and then get the length of that vector.
         */
-       zfac = mul_project_m4_v3_zfac(t->persmat, t->center);
+       zfac = mul_project_m4_v3_zfac(t->persmat, t->center_global);
        zfac = len_v3(t->persinv[0]) * 2.0f / t->ar->winx * zfac * 30.0f;
 
        for (i = 0; i < 3; i++) {