mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-06 00:53:52 +00:00
fix(editor): NPC ghost preview, scale control, frame sync for M2 rendering
- Ghost preview now shows in NPC mode (follows cursor with creature model) - Added scale field to CreatureSpawn (default 1.0, slider 0.5-10x) - NPC instances render at their configured scale - Scale included in JSON save format - M2Renderer::update() now runs AFTER beginFrame() so getCurrentFrame() returns the correct frame index — fixes instance SSBO mismatch that caused draws=0 despite loaded models
This commit is contained in:
parent
2980ca83e7
commit
f38884856f
5 changed files with 13 additions and 3 deletions
|
|
@ -242,7 +242,7 @@ void EditorViewport::rebuildObjects(const std::vector<PlacedObject>& objects,
|
|||
m2ModelIds[npc.modelPath] = modelId;
|
||||
}
|
||||
glm::vec3 rotRad = glm::radians(glm::vec3(0, 0, npc.orientation));
|
||||
m2Renderer_->createInstance(modelId, npc.position, rotRad, 1.0f);
|
||||
m2Renderer_->createInstance(modelId, npc.position, rotRad, npc.scale);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue