From f23dda7317e51c197125e56465425f61e49f5a99 Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Mon, 3 Mar 2014 17:34:16 -0800 Subject: [PATCH] Less math for the same effect. --- libraries/shared/src/CapsuleShape.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/shared/src/CapsuleShape.cpp b/libraries/shared/src/CapsuleShape.cpp index c71f03aa47..bae5f201ca 100644 --- a/libraries/shared/src/CapsuleShape.cpp +++ b/libraries/shared/src/CapsuleShape.cpp @@ -47,12 +47,12 @@ CapsuleShape::CapsuleShape(float radius, const glm::vec3& startPoint, const glm: /// \param[out] startPoint is the center of start cap void CapsuleShape::getStartPoint(glm::vec3& startPoint) const { - startPoint = getPosition() - _halfHeight * (_rotation * glm::vec3(0.f, 1.f, 0.f)); + startPoint = getPosition() - _rotation * glm::vec3(0.f, _halfHeight, 0.f); } /// \param[out] endPoint is the center of the end cap void CapsuleShape::getEndPoint(glm::vec3& endPoint) const { - endPoint = getPosition() + _halfHeight * (_rotation * glm::vec3(0.f, 1.f, 0.f)); + endPoint = getPosition() + _rotation * glm::vec3(0.f, _halfHeight, 0.f); } void CapsuleShape::computeNormalizedAxis(glm::vec3& axis) const {