From bc102b000d6f495e1445344232666e0dcea2b85d Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sat, 14 Nov 2020 14:43:14 +0100 Subject: [PATCH] fixed camera not rotating in Nil shmup --- hypgraph.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hypgraph.cpp b/hypgraph.cpp index c5ab4895..e17a21eb 100644 --- a/hypgraph.cpp +++ b/hypgraph.cpp @@ -1653,7 +1653,11 @@ EX void centerpc(ld aspd) { transmatrix T = pc->at; int sl = snakelevel(cwt.at); if((sl || vid.eye) && WDIM == 2) T = T * zpush(cgi.SLEV[sl] - cgi.FLOOR + vid.eye); - View = iso_inverse(T); + /* in nonisotropic geometries, T is isometry * rotation, so iso_inverse does not work */ + if(nonisotropic) + View = inverse(T); + else + View = iso_inverse(T); if(prod) NLP = ortho_inverse(pc->ori); if(WDIM == 2) rotate_view( cspin(0, 1, M_PI) * cspin(2, 1, M_PI/2 + shmup::playerturny[id]) * spin(-M_PI/2) ); return;