mirror of
https://github.com/lubosz/overte.git
synced 2025-08-08 03:08:00 +02:00
Merge pull request #27 from wayne-chen/locomotionCRFeedback
adding precheck procedure
This commit is contained in:
commit
a2084259fa
1 changed files with 3 additions and 2 deletions
|
@ -3427,8 +3427,9 @@ glm::vec3 MyAvatar::calculateScaledDirection(){
|
||||||
forward = Vectors::ZERO;
|
forward = Vectors::ZERO;
|
||||||
}
|
}
|
||||||
right = (handRotation * controllerRight);
|
right = (handRotation * controllerRight);
|
||||||
if (glm::length(right) > EPSILON) {
|
transform = right - (glm::dot(right, Vectors::UNIT_Y) * Vectors::UNIT_Y);
|
||||||
right = glm::normalize(right - (glm::dot(right, Vectors::UNIT_Y) * Vectors::UNIT_Y));
|
if (glm::length(transform) > EPSILON) {
|
||||||
|
right = glm::normalize(transform);
|
||||||
} else {
|
} else {
|
||||||
right = Vectors::ZERO;
|
right = Vectors::ZERO;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue