Less skeleton averaging, can see first person arms

This commit is contained in:
Philip Rosedale 2013-07-12 17:00:47 -07:00
parent ec48c6bf28
commit 832e81b45f
2 changed files with 4 additions and 4 deletions

View file

@ -92,7 +92,7 @@ Avatar::Avatar(Node* owningNode) :
_mouseRayOrigin(0.0f, 0.0f, 0.0f),
_mouseRayDirection(0.0f, 0.0f, 0.0f),
_interactingOther(NULL),
_isMouseTurningRight(false),
_isMouseTurningRight(false),
_elapsedTimeMoving(0.0f),
_elapsedTimeStopped(0.0f),
_elapsedTimeSinceCollision(0.0f),
@ -1222,8 +1222,8 @@ glm::quat Avatar::computeRotationFromBodyToWorldUp(float proportion) const {
}
float Avatar::getBallRenderAlpha(int ball, bool lookingInMirror) const {
const float RENDER_OPAQUE_OUTSIDE = 1.25f; // render opaque if greater than this distance
const float DO_NOT_RENDER_INSIDE = 0.75f; // do not render if less than this distance
const float RENDER_OPAQUE_OUTSIDE = 0.25f; // render opaque if greater than this distance
const float DO_NOT_RENDER_INSIDE = 0.25f; // do not render if less than this distance
float distanceToCamera = glm::length(Application::getInstance()->getCamera()->getPosition() - _bodyBall[ball].position);
return (lookingInMirror || !isMyAvatar()) ? 1.0f : glm::clamp(
(distanceToCamera - DO_NOT_RENDER_INSIDE) / (RENDER_OPAQUE_OUTSIDE - DO_NOT_RENDER_INSIDE), 0.f, 1.f);

View file

@ -215,7 +215,7 @@ void Webcam::setFrame(const Mat& frame, int format, const Mat& depth, const Rota
if (!_joints[i].isValid) {
continue;
}
const float JOINT_SMOOTHING = 0.9f;
const float JOINT_SMOOTHING = 0.5f;
_estimatedJoints[i].isValid = true;
_estimatedJoints[i].position = glm::mix(_joints[i].position - origin,
_estimatedJoints[i].position, JOINT_SMOOTHING);