mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 09:33:51 +00:00
fix(rendering): handle global sequences in character bone transforms
Hair, cape, and other physics bones use global sequences (continuously looping timers independent of the character's current animation). The character renderer was ignoring globalSequence entirely, causing these bones to fall back to identity transforms and produce deformed/spiked hair geometry. Added resolveTrackTime() to wrap global sequence time correctly, matching the M2 renderer's existing behavior.
This commit is contained in:
parent
634bac6c7a
commit
5468a93f2e
2 changed files with 40 additions and 6 deletions
|
|
@ -206,7 +206,8 @@ private:
|
|||
void calculateBindPose(M2ModelGPU& gpuModel);
|
||||
void updateAnimation(CharacterInstance& instance, float deltaTime);
|
||||
void calculateBoneMatrices(CharacterInstance& instance);
|
||||
glm::mat4 getBoneTransform(const pipeline::M2Bone& bone, float time, int sequenceIndex);
|
||||
glm::mat4 getBoneTransform(const pipeline::M2Bone& bone, float time, int sequenceIndex,
|
||||
const std::vector<uint32_t>& globalSeqDurations);
|
||||
glm::mat4 getModelMatrix(const CharacterInstance& instance) const;
|
||||
void destroyModelGPU(M2ModelGPU& gpuModel, bool defer = false);
|
||||
void destroyInstanceBones(CharacterInstance& inst, bool defer = false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue