From 07e689f08619f6c237cc47f9c60b656cde71b911 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Mon, 18 Jun 2018 13:02:53 -0700 Subject: [PATCH] removing compute/check for u --- interface/src/ui/overlays/Billboardable.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/interface/src/ui/overlays/Billboardable.cpp b/interface/src/ui/overlays/Billboardable.cpp index ea943590c7..a125956b5a 100644 --- a/interface/src/ui/overlays/Billboardable.cpp +++ b/interface/src/ui/overlays/Billboardable.cpp @@ -41,13 +41,11 @@ bool Billboardable::pointTransformAtCamera(Transform& transform, glm::quat offse glm::vec3 cameraPos = qApp->getCamera().getPosition(); // use the referencial from the avatar, y isn't always up glm::vec3 avatarUP = DependencyManager::get()->getMyAvatar()->getWorldOrientation()*Vectors::UP; - // check to see if glm::lookAt will work / using glm::lookAt function names - + // check to see if glm::lookAt will work / using glm::lookAt variable name glm::highp_vec3 s(glm::cross(billboardPos - cameraPos, avatarUP)); - glm::highp_vec3 u(glm::cross(s, billboardPos - cameraPos)); - // make sure s and u are not NaN for any component - if(glm::length2(s) > 0.0f && glm::length2(u) > 0.0f) { + // make sure s is not NaN for any component + if(glm::length2(s) > 0.0f) { glm::quat rotation(conjugate(toQuat(glm::lookAt(cameraPos, billboardPos, avatarUP)))); transform.setRotation(rotation); transform.postRotate(offsetRotation);