From 0520eb132c0e8c121e9e727fd926d1ab8bbd593c Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Wed, 30 Dec 2020 03:29:01 +0100 Subject: [PATCH] vr:: vr move/rotate now changes the reference in eHeadest::model_viewing --- control.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/control.cpp b/control.cpp index 9c5821fd..79471829 100644 --- a/control.cpp +++ b/control.cpp @@ -786,13 +786,7 @@ EX void mainloopiter() { rug::using_rugview urv; dynamicval ds(didsomething, didsomething); using namespace vrhr; - if(in_perspective_v()) { - if(vraim_x) full_rotate_camera(0, -vraim_x / 20); - if(vraim_y) full_rotate_camera(1, vraim_y / 20); - if(vrgo_y) full_forward_camera(-vrgo_y / 20); - if(vrgo_x) full_strafe_camera(-vrgo_x / 20); - } - else { + if(vrhr::hsm == vrhr::eHeadset::model_viewing) { E4; transmatrix T = hmd_at * inverse(hmd_ref_at); @@ -805,6 +799,12 @@ EX void mainloopiter() { hmd_ref_at = inverse(T) * hmd_at; } + else if(in_perspective_v()) { + if(vraim_x) full_rotate_camera(0, -vraim_x / 20); + if(vraim_y) full_rotate_camera(1, vraim_y / 20); + if(vrgo_y) full_forward_camera(-vrgo_y / 20); + if(vrgo_x) full_strafe_camera(-vrgo_x / 20); + } } #endif