added apply button to rotate playspace instead of automatically rotating

This commit is contained in:
ykeara
2018-12-16 13:58:00 -06:00
parent 859e30dad1
commit 9782839749
3 changed files with 27 additions and 5 deletions
+11 -3
View File
@@ -113,15 +113,23 @@ int MoveCenterTabController::rotation() const {
void MoveCenterTabController::setRotation(int value, bool notify) {
if (m_rotation != value) {
float angle = (value - m_rotation) * 2 * M_PI / 360.0;
parent->RotateUniverseCenter((vr::TrackingUniverseOrigin)m_trackingUniverse, angle, m_adjustChaperone);
//float angle = (value - m_rotation) * 2 * M_PI / 360.0;
//parent->RotateUniverseCenter((vr::TrackingUniverseOrigin)m_trackingUniverse, angle, m_adjustChaperone);
m_rotation = value;
if (notify) {
if (notify) {
emit rotationChanged(m_rotation);
}
}
}
void MoveCenterTabController::applyRotation() {
if (m_rotation != m_rotationOld) {
float angle = (m_rotationOld - m_rotation) * 2 * M_PI / 360.0;
parent->RotateUniverseCenter((vr::TrackingUniverseOrigin)m_trackingUniverse, angle, m_adjustChaperone);
m_rotationOld = m_rotation;
}
}
bool MoveCenterTabController::adjustChaperone() const {
return m_adjustChaperone;
}