mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
Fix jump collision and WMO doodad rotation bugs
Prevent character from being yanked down during upward jump movement, and correct quaternion rotation for holiday decorations.
This commit is contained in:
parent
28330adfb0
commit
af0a3a4daf
2 changed files with 6 additions and 3 deletions
|
|
@ -451,9 +451,12 @@ 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::mat4 doodadLocal(1.0f);
|
||||
doodadLocal = glm::translate(doodadLocal, doodad.position);
|
||||
doodadLocal *= glm::mat4_cast(doodad.rotation);
|
||||
doodadLocal *= glm::mat4_cast(fixedRotation);
|
||||
doodadLocal = glm::scale(doodadLocal, glm::vec3(doodad.scale));
|
||||
|
||||
// Full world transform = WMO world transform * doodad local transform
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue