mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
Fix WMO doodad rotation: remove incorrect quaternion X/Y swap
The glm::quat(w,x,y,z) constructor was receiving swapped X/Y components, causing doodads like the Deeprun Tram gears to be oriented horizontally instead of vertically. Also use createInstanceWithMatrix for instance WMO doodads to preserve full rotation from the quaternion.
This commit is contained in:
parent
8b0c2a0fa1
commit
7630c7aec7
2 changed files with 4 additions and 5 deletions
|
|
@ -567,8 +567,7 @@ std::shared_ptr<PendingTile> TerrainManager::prepareTile(int x, int y) {
|
|||
|
||||
// Build doodad's local transform (WoW coordinates)
|
||||
// WMO doodads use quaternion rotation
|
||||
// Fix: WoW quaternions need X/Y swap for correct orientation
|
||||
glm::quat fixedRotation(doodad.rotation.w, doodad.rotation.y, doodad.rotation.x, doodad.rotation.z);
|
||||
glm::quat fixedRotation(doodad.rotation.w, doodad.rotation.x, doodad.rotation.y, doodad.rotation.z);
|
||||
|
||||
glm::mat4 doodadLocal(1.0f);
|
||||
doodadLocal = glm::translate(doodadLocal, doodad.position);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue