summaryrefslogtreecommitdiffhomepage
path: root/logic
diff options
context:
space:
mode:
Diffstat (limited to 'logic')
-rw-r--r--logic/main-settings.cpp1
-rw-r--r--logic/main-settings.hpp2
-rw-r--r--logic/tracker.cpp13
-rw-r--r--logic/tracker.h4
4 files changed, 7 insertions, 13 deletions
diff --git a/logic/main-settings.cpp b/logic/main-settings.cpp
index 64bd0010..a847c920 100644
--- a/logic/main-settings.cpp
+++ b/logic/main-settings.cpp
@@ -23,7 +23,6 @@ main_settings::main_settings() :
camera_roll(b, "camera-roll", 0),
center_at_startup(b, "center-at-startup", true),
center_method(b, "centering-method", 1),
- neck_y(b, "neck-height", 0),
neck_z(b, "neck-depth", 0),
neck_enable(b, "neck-enable", false),
key_start_tracking1(b, "start-tracking"),
diff --git a/logic/main-settings.hpp b/logic/main-settings.hpp
index 6e6f698f..6f7c2c82 100644
--- a/logic/main-settings.hpp
+++ b/logic/main-settings.hpp
@@ -79,7 +79,7 @@ struct OTR_LOGIC_EXPORT main_settings final
value<int> camera_yaw, camera_pitch, camera_roll;
value<bool> center_at_startup;
value<int> center_method;
- value<int> neck_y, neck_z;
+ value<int> neck_z;
value<bool> neck_enable;
key_opts key_start_tracking1, key_start_tracking2;
key_opts key_stop_tracking1, key_stop_tracking2;
diff --git a/logic/tracker.cpp b/logic/tracker.cpp
index 48a50d80..e09000e2 100644
--- a/logic/tracker.cpp
+++ b/logic/tracker.cpp
@@ -284,18 +284,18 @@ void Tracker::logic()
if (s.neck_enable)
{
- double ny = s.neck_y, nz = -s.neck_z;
+ double nz = -s.neck_z;
- if (ny != 0 || nz != 0)
+ if (nz != 0)
{
const rmat R = euler_to_rmat(
euler_t(value(Yaw) * d2r,
value(Pitch) * d2r,
value(Roll) * d2r));
- euler_t xyz(0, ny, nz);
+ euler_t xyz(0, 0, nz);
t_compensate(R, xyz, xyz, false, false, false);
neck(TX) = xyz(TX);
- neck(TY) = xyz(TY) - ny;
+ neck(TY) = xyz(TY);
neck(TZ) = xyz(TZ) - nz;
}
}
@@ -304,9 +304,7 @@ void Tracker::logic()
for (int i = 3; i < 6; i++)
value(i) = map(value(i), m(i));
- const bool reltrans = !get(f_tcomp_disabled);
-
- if (s.tcomp_p && reltrans)
+ if (s.tcomp_p)
{
const double tcomp_c[] =
{
@@ -490,6 +488,5 @@ bits::bits() : b(0u)
set(f_center, true);
set(f_enabled, true);
set(f_zero, false);
- set(f_tcomp_disabled, false);
set(f_should_quit, false);
}
diff --git a/logic/tracker.h b/logic/tracker.h
index 2f29aca7..2e6350d7 100644
--- a/logic/tracker.h
+++ b/logic/tracker.h
@@ -39,8 +39,7 @@ struct bits
f_center = 1 << 0,
f_enabled = 1 << 1,
f_zero = 1 << 2,
- f_tcomp_disabled = 1 << 3,
- f_should_quit = 1 << 4,
+ f_should_quit = 1 << 3,
};
std::atomic<unsigned> b;
@@ -113,7 +112,6 @@ public:
void set_toggle(bool value) { set(f_enabled, value); }
void set_zero(bool value) { set(f_zero, value); }
- void set_tcomp_disabled(bool x) { set(f_tcomp_disabled, x); }
void zero() { negate(f_zero); }
void toggle_enabled() { negate(f_enabled); }