[Add] 애니메이션 2개 섞는거 추가

[Add] 루모스 + 포션 상태 추가
This commit is contained in:
hyunbin14
2025-11-30 17:21:12 +09:00
parent ccb7b8682a
commit 29ecd96bb2
15 changed files with 469 additions and 92 deletions
+36 -7
View File
@@ -113,12 +113,26 @@ HRESULT CChannel::Initialize(const vector<CBone*>& Bones, _uint iIndex)
void CChannel::Update_TransformationMatirx(
const vector<CBone*>& Bones,
const LOCALPOS_DESC* pLocalPosArray,
LOCALPOS_DESC** pLocalPosArray,
_float fCurrentTrackPosition,
_uint* pCurrentKeyFrameIndex,
_bool bIsSpine,
vector<_uint> BoneMask,
_vector vector[3])
{
const LOCALPOS_DESC& LocalPos = pLocalPosArray[m_iBoneIndex];
LOCALPOS_DESC& LocalPos = pLocalPosArray[0][m_iBoneIndex];
_bool isUpper = false;
_int layerIndex = 0;
if (!bIsSpine)
{
isUpper = BoneMask[m_iBoneIndex];
layerIndex = isUpper ? 1 : 0;
LocalPos = pLocalPosArray[layerIndex][m_iBoneIndex];
}
else
{
LocalPos = pLocalPosArray[0][m_iBoneIndex];
}
_vector vScale = XMLoadFloat3(&LocalPos.Scale);
_vector vRotation = XMLoadFloat4(&LocalPos.Rotation);
@@ -128,17 +142,32 @@ void CChannel::Update_TransformationMatirx(
LocalPos.Translation.z,
1.f);
if (Bones[m_iBoneIndex]->Compare_Name("Reference"))
if (Bones[m_iBoneIndex]->Compare_Name("Reference") && vector)
{
vector[0] = vScale;
vector[1] = vRotation;
vector[2] = vTranslation;
}
m_BoneTransformationMatrix =
XMMatrixAffineTransformation(vScale, XMVectorSet(0.f, 0.f, 0.f, 1.f), vRotation, vTranslation);
Bones[m_iBoneIndex]->Set_TransformationMatrix(m_BoneTransformationMatrix);
if (bIsSpine)
{
m_BoneTransformationMatrix =
XMMatrixAffineTransformation(vScale, XMVectorSet(0.f, 0.f, 0.f, 1.f), vRotation, vTranslation);
Bones[m_iBoneIndex]->Set_TransformationMatrix(m_BoneTransformationMatrix);
}
else
{
if (layerIndex == 1)
{
m_BoneTransformationMatrix =
XMMatrixAffineTransformation(vScale, XMVectorSet(0.f, 0.f, 0.f, 1.f), vRotation, vTranslation);
Bones[m_iBoneIndex]->Set_TransformationMatrix(m_BoneTransformationMatrix);
}
}
}
void CChannel::ResetRootMotion()