mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2026-11-29 00:23:08 +00:00
shmup::vr:: shmup/racing controls for vr
This commit is contained in:
1 parent
726c2fc871
commit
79bf71ce78
2 files changed
+17
-1
No files matched your search
@@ -781,6 +781,22 @@ void movePlayer(monster *m, int delta) {
|
||||
mdy = (mousey - yb) / (rad/2.);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if CAP_VR
|
||||
if(vrhr::active()) {
|
||||
if(GDIM == 3) {
|
||||
mouseaim_x += vrhr::vraim_x * delta / 400;
|
||||
mouseaim_y -= vrhr::vraim_y * delta / 400;
|
||||
mdy -= vrhr::vrgo_y;
|
||||
mdx += vrhr::vrgo_x;
|
||||
}
|
||||
else {
|
||||
println(hlog, "2dim");
|
||||
mturn -= vrhr::vraim_x + vrhr::vrgo_x;
|
||||
mgo += vrhr::vrgo_y + vrhr::vraim_y;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if(actionspressed[b+pcOrbPower] && !lactionpressed[b+pcOrbPower] && mouseover && !m->dead) {
|
||||
cwt.at = m->base;
|
||||
|
||||
Reference in new issue
Block a user