mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 06:53:59 +02:00
Change abs to fabsf and other corrections requested.
This commit is contained in:
parent
9bc165d8b4
commit
46583a90be
1 changed files with 2 additions and 4 deletions
|
@ -81,6 +81,7 @@ const QString& DEFAULT_AVATAR_COLLISION_SOUND_URL = "https://hifi-public.s3.amaz
|
|||
const float MyAvatar::ZOOM_MIN = 0.5f;
|
||||
const float MyAvatar::ZOOM_MAX = 25.0f;
|
||||
const float MyAvatar::ZOOM_DEFAULT = 1.5f;
|
||||
const float MIN_SCALE_CHANGED_DELTA = 0.001f;
|
||||
|
||||
MyAvatar::MyAvatar(QThread* thread) :
|
||||
Avatar(thread),
|
||||
|
@ -670,8 +671,7 @@ void MyAvatar::updateSensorToWorldMatrix() {
|
|||
_sensorToWorldMatrix = desiredMat * glm::inverse(_bodySensorMatrix);
|
||||
|
||||
bool hasSensorToWorldScaleChanged = false;
|
||||
|
||||
if (abs(AvatarData::getSensorToWorldScale() - sensorToWorldScale) > 0.001f) {
|
||||
if (fabsf(getSensorToWorldScale() - sensorToWorldScale) > MIN_SCALE_CHANGED_DELTA) {
|
||||
hasSensorToWorldScaleChanged = true;
|
||||
}
|
||||
|
||||
|
@ -683,13 +683,11 @@ void MyAvatar::updateSensorToWorldMatrix() {
|
|||
}
|
||||
|
||||
_sensorToWorldMatrixCache.set(_sensorToWorldMatrix);
|
||||
|
||||
updateJointFromController(controller::Action::LEFT_HAND, _controllerLeftHandMatrixCache);
|
||||
updateJointFromController(controller::Action::RIGHT_HAND, _controllerRightHandMatrixCache);
|
||||
|
||||
if (hasSensorToWorldScaleChanged) {
|
||||
emit sensorToWorldScaleChanged(sensorToWorldScale);
|
||||
//qDebug() << "Debug: emit sensorToWorldScaleChanged " << sensorToWorldScale;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue