added apply button to rotate playspace instead of automatically rotating
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user