mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 06:44:06 +02:00
clarify how the size of the cube is computed
This commit is contained in:
parent
7cde6811ca
commit
27621b316d
1 changed files with 4 additions and 4 deletions
|
@ -1488,10 +1488,10 @@ static CollisionList myCollisions(64);
|
|||
|
||||
void MyAvatar::updateCollisionWithVoxels(float deltaTime, float radius) {
|
||||
if (Menu::getInstance()->isOptionChecked(MenuOption::CollideAsRagdoll)) {
|
||||
// compute the bounding cube around avatar
|
||||
float radius = 2.0f * getBoundingRadius();
|
||||
glm::vec3 corner = getPosition() - glm::vec3(radius);
|
||||
AACube boundingCube(corner, 2.0f * radius);
|
||||
// We use a multiple of the avatar's boundingRadius as the size of the cube of interest.
|
||||
float cubeScale = 4.0f * getBoundingRadius();
|
||||
glm::vec3 corner = getPosition() - glm::vec3(0.5f * cubeScale);
|
||||
AACube boundingCube(corner, cubeScale);
|
||||
|
||||
// query the VoxelTree for cubes that touch avatar's boundingCube
|
||||
CubeList cubes;
|
||||
|
|
Loading…
Reference in a new issue