fix(editor): WMO instance scale actually applied to renderer

WMORenderer::createInstance accepts a scale parameter (default 1.0),
but the editor's call site ignored obj.scale. So a WMO sized to 2.0 in
the panel still rendered at 1.0. Now passes obj.scale through, so the
loaded MODF scale + any user gizmo scaling work end-to-end.
This commit is contained in:
Kelsi 2026-05-06 03:52:40 -07:00
parent 32ff80f177
commit cbf1d4638f

View file

@ -242,7 +242,10 @@ void EditorViewport::rebuildObjects(const std::vector<PlacedObject>& objects,
wmoModelIds[obj.path] = modelId;
}
glm::vec3 wmoRotRad = glm::radians(obj.rotation);
wmoRenderer_->createInstance(modelId, obj.position, wmoRotRad);
// Pass through obj.scale so non-1.0 WMO instance scales (loaded
// from MODF, edited via the gizmo, or duplicated) actually render
// at the right size instead of always 1.0.
wmoRenderer_->createInstance(modelId, obj.position, wmoRotRad, obj.scale);
}
}