mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-07 16:41:03 +02:00
take shape offset into account when getting avatar's capsule
This commit is contained in:
parent
52d017ac74
commit
03ed36cf33
1 changed files with 2 additions and 2 deletions
|
@ -1089,8 +1089,8 @@ void Avatar::getCapsule(glm::vec3& start, glm::vec3& end, float& radius) {
|
|||
ShapeInfo shapeInfo;
|
||||
computeShapeInfo(shapeInfo);
|
||||
glm::vec3 halfExtents = shapeInfo.getHalfExtents(); // x = radius, y = halfHeight
|
||||
start = getPosition() - glm::vec3(0, halfExtents.y, 0);
|
||||
end = getPosition() + glm::vec3(0, halfExtents.y, 0);
|
||||
start = getPosition() - glm::vec3(0, halfExtents.y, 0) + shapeInfo.getOffset();
|
||||
end = getPosition() + glm::vec3(0, halfExtents.y, 0) + shapeInfo.getOffset();
|
||||
radius = halfExtents.x;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue