mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-11 09:50:34 +00:00
vr:: vr move/rotate now changes the reference in eHeadest::model_viewing
This commit is contained in:
parent
2c59aa0e14
commit
0520eb132c
14
control.cpp
14
control.cpp
@ -786,13 +786,7 @@ EX void mainloopiter() {
|
||||
rug::using_rugview urv;
|
||||
dynamicval<bool> 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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user