mirror of
https://github.com/JoeyDeVries/LearnOpenGL.git
synced 2026-01-30 20:13:22 +08:00
Fixed errors in skeletal animation code
This commit is contained in:
@@ -22,7 +22,7 @@ public:
|
||||
m_FinalBoneMatrices.push_back(glm::mat4(1.0f));
|
||||
}
|
||||
|
||||
void Animator::UpdateAnimation(float dt)
|
||||
void UpdateAnimation(float dt)
|
||||
{
|
||||
m_DeltaTime = dt;
|
||||
if (m_CurrentAnimation)
|
||||
@@ -33,13 +33,13 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void Animator::PlayAnimation(Animation* pAnimation)
|
||||
void PlayAnimation(Animation* pAnimation)
|
||||
{
|
||||
m_CurrentAnimation = pAnimation;
|
||||
m_CurrentTime = 0.0f;
|
||||
}
|
||||
|
||||
void Animator::CalculateBoneTransform(const AssimpNodeData* node, glm::mat4 parentTransform)
|
||||
void CalculateBoneTransform(const AssimpNodeData* node, glm::mat4 parentTransform)
|
||||
{
|
||||
std::string nodeName = node->name;
|
||||
glm::mat4 nodeTransform = node->transformation;
|
||||
@@ -77,4 +77,4 @@ private:
|
||||
float m_CurrentTime;
|
||||
float m_DeltaTime;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user