mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 18:50:00 +02:00
Less math for the same effect.
This commit is contained in:
parent
1c0826d696
commit
f23dda7317
1 changed files with 2 additions and 2 deletions
|
@ -47,12 +47,12 @@ CapsuleShape::CapsuleShape(float radius, const glm::vec3& startPoint, const glm:
|
||||||
|
|
||||||
/// \param[out] startPoint is the center of start cap
|
/// \param[out] startPoint is the center of start cap
|
||||||
void CapsuleShape::getStartPoint(glm::vec3& startPoint) const {
|
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
|
/// \param[out] endPoint is the center of the end cap
|
||||||
void CapsuleShape::getEndPoint(glm::vec3& endPoint) const {
|
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 {
|
void CapsuleShape::computeNormalizedAxis(glm::vec3& axis) const {
|
||||||
|
|
Loading…
Reference in a new issue