Merge pull request #27 from wayne-chen/locomotionCRFeedback

adding precheck procedure
This commit is contained in:
Wayne Chen 2019-04-04 13:56:20 -07:00 committed by GitHub
commit a2084259fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3427,8 +3427,9 @@ glm::vec3 MyAvatar::calculateScaledDirection(){
forward = Vectors::ZERO;
}
right = (handRotation * controllerRight);
if (glm::length(right) > EPSILON) {
right = glm::normalize(right - (glm::dot(right, Vectors::UNIT_Y) * Vectors::UNIT_Y));
transform = right - (glm::dot(right, Vectors::UNIT_Y) * Vectors::UNIT_Y);
if (glm::length(transform) > EPSILON) {
right = glm::normalize(transform);
} else {
right = Vectors::ZERO;
}