Apply fix for reset button rotation from alpha-kung branch
This commit is contained in:
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user