From 27621b316d83a565ccf7c96b6c34787834e0bb9d Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Thu, 4 Sep 2014 15:41:24 -0700 Subject: [PATCH] clarify how the size of the cube is computed --- interface/src/avatar/MyAvatar.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/interface/src/avatar/MyAvatar.cpp b/interface/src/avatar/MyAvatar.cpp index 9c6a833da0..9c81e9cf17 100644 --- a/interface/src/avatar/MyAvatar.cpp +++ b/interface/src/avatar/MyAvatar.cpp @@ -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;