mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-08 10:03:51 +00:00
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:
parent
32ff80f177
commit
cbf1d4638f
1 changed files with 4 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue