mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-14 22:25:33 +02:00
Fix strafing with controller-relative movement (was wrong local axis for controller).
This commit is contained in:
parent
80abfbab5e
commit
a1c24516c2
1 changed files with 1 additions and 1 deletions
|
@ -3289,7 +3289,7 @@ glm::vec3 MyAvatar::calculateScaledDirection(){
|
|||
// If we're on the right hand, we have to flip the x-axis.
|
||||
auto handRotation = getDominantHandRotation();
|
||||
glm::vec3 controllerForward(0.0f, 1.0f, 0.0f);
|
||||
glm::vec3 controllerRight((getDominantHand() == DOMINANT_RIGHT_HAND ? -1.0f : 1.0f), 0.0f, 0.0f);
|
||||
glm::vec3 controllerRight(0.0f, 0.0f, (getDominantHand() == DOMINANT_RIGHT_HAND ? -1.0f : 1.0f));
|
||||
forward = (getDriveKey(TRANSLATE_Z)) * (handRotation * controllerForward);
|
||||
right = (getDriveKey(TRANSLATE_X)) * (handRotation * controllerRight);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue