fix scaling of worn shape entities

This commit is contained in:
Seth Alves 2018-09-15 16:36:55 -07:00
parent be76c43aec
commit 1e8ae1a294

View file

@ -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);
} }