1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-27 14:37:16 +00:00

vr:: down direction in 2.5D/H2xE can be changed

This commit is contained in:
Zeno Rogue 2021-02-06 13:04:18 +01:00
parent 53b541f520
commit a70dcb7cea

View File

@ -1715,6 +1715,8 @@ EX hyperpoint vertical_vector() {
return C0;
}
EX bool down_is_forward;
EX void spinEdge(ld aspd) {
#if CAP_VR
@ -1730,7 +1732,9 @@ EX void spinEdge(ld aspd) {
V = V * rgpushxto0(h);
}
V = cspin(2, 1, 90 * degree) * V;
int dir = down_is_forward ? 0 : 1;
V = cspin(2, dir, 90 * degree) * V;
if(1) {
dynamicval<eGeometry> g(geometry, gSphere);
@ -1747,7 +1751,7 @@ EX void spinEdge(ld aspd) {
vrhr::be_33(V);
V = cspin(1, 2, 90 * degree) * V;
V = cspin(dir, 2, 90 * degree) * V;
V = inverse(T) * V;
if(!prod) V = V * gpushxto0(h);
get_view_orientation() = V;