mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:44:02 +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) {
|
||||
float scaleLength = glm::length(_scale);
|
||||
float relativeDeltaScale = glm::length(_scale - scale) / scaleLength;
|
||||
|
||||
const float ONE_PERCENT = 0.01f;
|
||||
if (relativeDeltaScale > ONE_PERCENT || scaleLength < EPSILON) {
|
||||
if (glm::distance(_scale, scale) > METERS_PER_MILLIMETER) {
|
||||
_scale = scale;
|
||||
initJointTransforms();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue