mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 13:38:02 +02:00
fix scaling of worn shape entities
This commit is contained in:
parent
be76c43aec
commit
1e8ae1a294
1 changed files with 2 additions and 2 deletions
|
@ -97,10 +97,10 @@ void ShapeEntityRenderer::doRenderUpdateSynchronousTyped(const ScenePointer& sce
|
||||||
withWriteLock([&] {
|
withWriteLock([&] {
|
||||||
auto entity = getEntity();
|
auto entity = getEntity();
|
||||||
_position = entity->getWorldPosition();
|
_position = entity->getWorldPosition();
|
||||||
_dimensions = entity->getScaledDimensions();
|
_dimensions = entity->getUnscaledDimensions(); // get unscaled to avoid scaling twice
|
||||||
_orientation = entity->getWorldOrientation();
|
_orientation = entity->getWorldOrientation();
|
||||||
updateModelTransformAndBound();
|
updateModelTransformAndBound();
|
||||||
_renderTransform = getModelTransform();
|
_renderTransform = getModelTransform(); // contains parent scale, if this entity scales with its parent
|
||||||
if (_shape == entity::Sphere) {
|
if (_shape == entity::Sphere) {
|
||||||
_renderTransform.postScale(SPHERE_ENTITY_SCALE);
|
_renderTransform.postScale(SPHERE_ENTITY_SCALE);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue