diff --git a/config.cpp b/config.cpp index 910cbad9..1bba4008 100644 --- a/config.cpp +++ b/config.cpp @@ -171,6 +171,7 @@ void initConfig() { addsaver(vid.yshift, "Y shift", 0); addsaver(vid.use_wall_radar, "wallradar", true); addsaver(vid.fixed_facing, "fixed facing", 0); + addsaver(vid.fixed_yz, "fixed YZ", true); addsaver(vid.camera_angle, "camera angle", 0); addsaver(vid.ballproj, "ballproj", 1); addsaver(vid.monmode, "monster display mode", DEFAULT_MONMODE); @@ -1275,6 +1276,10 @@ void show3D() { } }); } + + if(WDIM == 2 && GDIM == 3) + dialog::addBoolItem_action("fixed Y/Z rotation", vid.fixed_yz, 'Z'); + if(true) { dialog::addBreak(50); dialog::addSelItem(XLAT("projection"), current_proj_name(), 'M'); diff --git a/hyper.h b/hyper.h index fcb5910c..627d6135 100644 --- a/hyper.h +++ b/hyper.h @@ -1095,6 +1095,7 @@ struct videopar { int radarsize; // radar for 3D geometries int aurastr, aurasmoothen; bool fixed_facing; + bool fixed_yz; bool use_wall_radar; int linequality; diff --git a/hypgraph.cpp b/hypgraph.cpp index 4e27e71d..808b655f 100644 --- a/hypgraph.cpp +++ b/hypgraph.cpp @@ -1075,6 +1075,11 @@ void spinEdge(ld aspd) { if(downspin > aspd) downspin = aspd; if(downspin < -aspd) downspin = -aspd; View = spin(downspin) * View; + + if(WDIM == 2 && GDIM == 3 && vid.fixed_yz && View[0][2]) { + ld d12 = atan2(View[0][2], View[1][2]); + View = cspin(1, 0, d12) * View; + } } void centerpc(ld aspd) {