mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-10-31 19:36:16 +00:00
ads-game:: joystick control
This commit is contained in:
parent
0c38c4ad68
commit
3c867a7ff0
@ -94,6 +94,20 @@ void apply_lorentz(transmatrix lor) {
|
||||
}
|
||||
|
||||
ld read_movement() {
|
||||
|
||||
ld mdx = multi::axespressed[4]/30000.;
|
||||
ld mdy = multi::axespressed[5]/30000.;
|
||||
#if CAP_VR
|
||||
if(vrhr::active()) {
|
||||
mdy -= vrhr::vrgo_y;
|
||||
mdx += vrhr::vrgo_x;
|
||||
}
|
||||
#endif
|
||||
if(mdx || mdy) {
|
||||
ang = atan2(mdy, mdx) / degree;
|
||||
return hypot(mdx, mdy);
|
||||
}
|
||||
|
||||
auto& a = multi::actionspressed;
|
||||
bool left = a[16+1];
|
||||
bool right = a[16+3];
|
||||
|
Loading…
Reference in New Issue
Block a user