Apply fix for reset button rotation from alpha-kung branch

This commit is contained in:
Kung-vr
2019-01-15 23:23:34 +09:00
parent 18a712f7fa
commit 089862e876
3 changed files with 41 additions and 14 deletions
+19 -3
View File
@@ -136,13 +136,20 @@ int MoveCenterTabController::rotation() const
return m_rotation;
}
int MoveCenterTabController::tempRotation() const
{
return m_tempRotation;
}
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 )
{
@@ -151,6 +158,15 @@ void MoveCenterTabController::setRotation( int value, bool notify )
}
}
void MoveCenterTabController::setTempRotation( int value, bool notify )
{
m_tempRotation = value;
if ( notify )
{
emit tempRotationChanged( m_tempRotation );
}
}
void MoveCenterTabController::applyRotation()
{
if ( m_rotation != m_rotationOld )