Fixed errors in skeletal animation code

This commit is contained in:
ankitgamezop
2022-02-19 23:16:20 +05:30
parent 6f9610815f
commit cc6b0b7834
6 changed files with 11 additions and 11 deletions

View File

@@ -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;
};
};

View File

@@ -160,7 +160,7 @@ private:
}
glm::mat4 Bone::InterpolateScaling(float animationTime)
glm::mat4 InterpolateScaling(float animationTime)
{
if (1 == m_NumScalings)
return glm::scale(glm::mat4(1.0f), m_Scales[0].scale);