diff --git a/graph.cpp b/graph.cpp index c16d0085..44f9842c 100644 --- a/graph.cpp +++ b/graph.cpp @@ -5091,13 +5091,13 @@ EX void make_actual_view() { } #endif #if MAXMDIM >= 4 - if(GDIM == 3 && WDIM == 2) { + if(embedded_plane) { transmatrix T = actual_view_transform * View; transmatrix U = view_inverse(T); - if(T[0][2]) + if(T[0][2] || T[1][2]) T = spin(-atan2(T[0][2], T[1][2])) * T; - if(T[1][2]) + if(T[1][2] || T[2][2]) T = cspin(1, 2, -atan2(T[1][2], T[2][2])) * T; ld z = -asin_auto(tC0(view_inverse(T)) [2]);