mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 21:57:00 +02:00
adding precheck procedure
This commit is contained in:
parent
819bf9212c
commit
c18b00ebec
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