mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 14:37:46 +02:00
Less skeleton averaging, can see first person arms
This commit is contained in:
parent
ec48c6bf28
commit
832e81b45f
2 changed files with 4 additions and 4 deletions
|
@ -1222,8 +1222,8 @@ glm::quat Avatar::computeRotationFromBodyToWorldUp(float proportion) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
float Avatar::getBallRenderAlpha(int ball, bool lookingInMirror) 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 RENDER_OPAQUE_OUTSIDE = 0.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 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);
|
float distanceToCamera = glm::length(Application::getInstance()->getCamera()->getPosition() - _bodyBall[ball].position);
|
||||||
return (lookingInMirror || !isMyAvatar()) ? 1.0f : glm::clamp(
|
return (lookingInMirror || !isMyAvatar()) ? 1.0f : glm::clamp(
|
||||||
(distanceToCamera - DO_NOT_RENDER_INSIDE) / (RENDER_OPAQUE_OUTSIDE - DO_NOT_RENDER_INSIDE), 0.f, 1.f);
|
(distanceToCamera - DO_NOT_RENDER_INSIDE) / (RENDER_OPAQUE_OUTSIDE - DO_NOT_RENDER_INSIDE), 0.f, 1.f);
|
||||||
|
|
|
@ -215,7 +215,7 @@ void Webcam::setFrame(const Mat& frame, int format, const Mat& depth, const Rota
|
||||||
if (!_joints[i].isValid) {
|
if (!_joints[i].isValid) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const float JOINT_SMOOTHING = 0.9f;
|
const float JOINT_SMOOTHING = 0.5f;
|
||||||
_estimatedJoints[i].isValid = true;
|
_estimatedJoints[i].isValid = true;
|
||||||
_estimatedJoints[i].position = glm::mix(_joints[i].position - origin,
|
_estimatedJoints[i].position = glm::mix(_joints[i].position - origin,
|
||||||
_estimatedJoints[i].position, JOINT_SMOOTHING);
|
_estimatedJoints[i].position, JOINT_SMOOTHING);
|
||||||
|
|
Loading…
Reference in a new issue