diff --git a/interface/src/raypick/ParabolaPick.cpp b/interface/src/raypick/ParabolaPick.cpp index b10f82c9bd..e8986f7ce9 100644 --- a/interface/src/raypick/ParabolaPick.cpp +++ b/interface/src/raypick/ParabolaPick.cpp @@ -36,9 +36,10 @@ PickParabola ParabolaPick::getMathematicalPick() const { glm::vec3 position = currentParentTransform.transform(_mathPick.origin); glm::vec3 velocity = _mathPick.velocity; if (_scaleWithParent) { - velocity = currentParentTransform.transform(velocity); - } else { velocity = currentParentTransform.transformDirection(velocity); + } else { + glm::vec3 transformedVelocity = currentParentTransform.transformDirection(velocity); + velocity = glm::normalize(transformedVelocity) * glm::distance(velocity, Vectors::ZERO); } glm::vec3 acceleration = _mathPick.acceleration; if (_rotateAccelerationWithAvatar) { diff --git a/interface/src/raypick/RayPick.cpp b/interface/src/raypick/RayPick.cpp index 227b4e2f32..ad12db4df2 100644 --- a/interface/src/raypick/RayPick.cpp +++ b/interface/src/raypick/RayPick.cpp @@ -22,7 +22,7 @@ PickRay RayPick::getMathematicalPick() const { Transform currentParentTransform = parentTransform->getTransform(); glm::vec3 origin = currentParentTransform.transform(_mathPick.origin); - glm::vec3 direction = currentParentTransform.transformDirection(_mathPick.direction); + glm::vec3 direction = glm::normalize(currentParentTransform.transformDirection(_mathPick.direction)); return PickRay(origin, direction); }