mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 22:51:20 +02:00
commit
429a4d51d5
1 changed files with 1 additions and 5 deletions
|
@ -89,11 +89,7 @@ void Model::setScale(const glm::vec3& scale) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Model::setScaleInternal(const glm::vec3& scale) {
|
void Model::setScaleInternal(const glm::vec3& scale) {
|
||||||
float scaleLength = glm::length(_scale);
|
if (glm::distance(_scale, scale) > METERS_PER_MILLIMETER) {
|
||||||
float relativeDeltaScale = glm::length(_scale - scale) / scaleLength;
|
|
||||||
|
|
||||||
const float ONE_PERCENT = 0.01f;
|
|
||||||
if (relativeDeltaScale > ONE_PERCENT || scaleLength < EPSILON) {
|
|
||||||
_scale = scale;
|
_scale = scale;
|
||||||
initJointTransforms();
|
initJointTransforms();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue