mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-02 12:19:18 +00:00
third_person_rotation
This commit is contained in:
parent
a4ec0cabf0
commit
8220611718
@ -1043,6 +1043,7 @@ EX void initConfig() {
|
||||
|
||||
param_f(camera_speed, "camspd", "camera-speed", 1);
|
||||
param_f(camera_rot_speed, "camrot", "camera-rot-speed", 1);
|
||||
param_f(third_person_rotation, "third_person_rotation", 0);
|
||||
|
||||
param_f(panini_alpha, "panini_alpha", 0);
|
||||
param_f(stereo_alpha, "stereo_alpha", 0);
|
||||
|
@ -364,6 +364,8 @@ EX void full_strafe_camera(ld t) {
|
||||
}
|
||||
}
|
||||
|
||||
EX ld third_person_rotation = 0;
|
||||
|
||||
EX void full_rotate_camera(int dir, ld val) {
|
||||
if(rug::rug_control() && lshiftclick) {
|
||||
val *= camera_rot_speed;
|
||||
@ -389,6 +391,7 @@ EX void full_rotate_camera(int dir, ld val) {
|
||||
#endif
|
||||
else if(GDIM == 3) {
|
||||
val *= camera_rot_speed;
|
||||
if(third_person_rotation) shift_view(ctangent(2, -third_person_rotation)), didsomething = true, playermoved = false;
|
||||
if(keep_vertical()) {
|
||||
hyperpoint vv = vertical_vector();
|
||||
ld alpha = -atan2(vv[2], vv[1]);
|
||||
@ -403,6 +406,7 @@ EX void full_rotate_camera(int dir, ld val) {
|
||||
}
|
||||
else
|
||||
rotate_view(cspin(dir, 2, val));
|
||||
if(third_person_rotation) shift_view(ctangent(2, third_person_rotation));
|
||||
if(!rug::rug_control()) didsomething = true;
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user