mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-13 22:27:13 +02:00
typo
This commit is contained in:
parent
922468ce1c
commit
f0133013c2
1 changed files with 2 additions and 2 deletions
|
@ -290,7 +290,7 @@ void ViveControllerManager::InputDevice::handleHandController(float deltaTime, u
|
|||
}
|
||||
}
|
||||
|
||||
void ViveControllerManager::InputDevice::partitionTouchpad(int sButton, int xAxis, int yAxis, int centerPseudoButton, int xPseudoButton, int yPesudoButton) {
|
||||
void ViveControllerManager::InputDevice::partitionTouchpad(int sButton, int xAxis, int yAxis, int centerPseudoButton, int xPseudoButton, int yPseudoButton) {
|
||||
// Populate the L/RS_CENTER/OUTER pseudo buttons, corresponding to a partition of the L/RS space based on the X/Y values.
|
||||
const float CENTER_DEADBAND = 0.6f;
|
||||
const float DIAGONAL_DIVIDE_IN_RADIANS = PI / 4.0f;
|
||||
|
@ -301,7 +301,7 @@ void ViveControllerManager::InputDevice::partitionTouchpad(int sButton, int xAxi
|
|||
float angle = glm::atan(cartesianQuadrantI.y / cartesianQuadrantI.x);
|
||||
float radius = glm::length(cartesianQuadrantI);
|
||||
bool isCenter = radius < CENTER_DEADBAND;
|
||||
_buttonPressedMap.insert(isCenter ? centerPseudoButton : ((angle < DIAGONAL_DIVIDE_IN_RADIANS) ? xPseudoButton :yPesudoButton));
|
||||
_buttonPressedMap.insert(isCenter ? centerPseudoButton : ((angle < DIAGONAL_DIVIDE_IN_RADIANS) ? xPseudoButton :yPseudoButton));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue