adding MyAvatar::_canonicalScale, but not used yet

This commit is contained in:
Andrew Meadows 2016-09-19 08:58:19 -07:00
parent e6d40e6e4d
commit 80b970f2d9
2 changed files with 3 additions and 0 deletions

View file

@ -1229,6 +1229,8 @@ void MyAvatar::rebuildCollisionShape() {
float scale = getUniformScale();
float radius = scale * _skeletonModel->getBoundingCapsuleRadius();
float height = scale * _skeletonModel->getBoundingCapsuleHeight() + 2.0f * radius;
const float CANONICAL_AVATAR_HEIGHT = 2.0f;
_canonicalScale = height / CANONICAL_AVATAR_HEIGHT;
glm::vec3 corner(-radius, -0.5f * height, -radius);
corner += scale * _skeletonModel->getBoundingCapsuleOffset();
glm::vec3 diagonal(2.0f * radius, height, 2.0f * radius);

View file

@ -500,6 +500,7 @@ private:
bool _hmdLeanRecenterEnabled = true;
bool _moveKinematically { false }; // KINEMATIC_CONTROLLER_HACK
float _canonicalScale { 1.0f };
float AVATAR_MOVEMENT_ENERGY_CONSTANT { 0.001f };
float AUDIO_ENERGY_CONSTANT { 0.000001f };