mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 15:49:24 +02:00
call simulate from setScaleInternal rather than just initJointTransforms so the scale change is visible
This commit is contained in:
parent
01d3977bf1
commit
ee5a82f9b8
1 changed files with 2 additions and 2 deletions
|
@ -92,7 +92,7 @@ void Model::setScale(const glm::vec3& scale) {
|
||||||
_scaledToFit = false;
|
_scaledToFit = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const float METERS_PER_MILLIMETER = 0.01f;
|
const float METERS_PER_MILLIMETER = 0.01f;
|
||||||
|
|
||||||
void Model::setScaleInternal(const glm::vec3& scale) {
|
void Model::setScaleInternal(const glm::vec3& scale) {
|
||||||
if (glm::distance(_scale, scale) > METERS_PER_MILLIMETER) {
|
if (glm::distance(_scale, scale) > METERS_PER_MILLIMETER) {
|
||||||
|
@ -100,7 +100,7 @@ void Model::setScaleInternal(const glm::vec3& scale) {
|
||||||
if (_scale.x == 0.0f || _scale.y == 0.0f || _scale.z == 0.0f) {
|
if (_scale.x == 0.0f || _scale.y == 0.0f || _scale.z == 0.0f) {
|
||||||
assert(false);
|
assert(false);
|
||||||
}
|
}
|
||||||
initJointTransforms();
|
simulate(0.0f, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue