[Add] 플레이어 look방향 보정
This commit is contained in:
@@ -118,6 +118,10 @@ void CChannel::Update_TransformationMatirx(
|
||||
_uint* pCurrentKeyFrameIndex,
|
||||
CTransform* pTransform,_float m_fAmount)
|
||||
{
|
||||
|
||||
if (0.f == fCurrentTrackPosition)
|
||||
*pCurrentKeyFrameIndex = 0;
|
||||
|
||||
KEYFRAME LastKeyFrame = m_KeyFrames.back();
|
||||
|
||||
_vector vScale{};
|
||||
@@ -171,7 +175,6 @@ void CChannel::Update_TransformationMatirx(
|
||||
|
||||
if (Bones[m_iBoneIndex]->Compare_Name("Reference") && pTransform != nullptr)
|
||||
{
|
||||
|
||||
_float3 vCurRootPos;
|
||||
XMStoreFloat3(&vCurRootPos, vTranslation);
|
||||
|
||||
@@ -192,8 +195,6 @@ void CChannel::Update_TransformationMatirx(
|
||||
vDeltaWorld *= 0.01f;
|
||||
vDeltaWorld *= m_fAmount;
|
||||
|
||||
|
||||
|
||||
vDeltaWorld = XMVectorSetW(vDeltaWorld, 1.f);
|
||||
//pTransform->Set_State(STATE::POSITION,vDeltaWorld);
|
||||
pTransform->AccumulateMomentum(vDeltaWorld);
|
||||
@@ -235,6 +236,8 @@ void CChannel::Update_TransformationMatirx(
|
||||
vRotation = XMLoadFloat4(&m_vInitialRootRot);
|
||||
}
|
||||
|
||||
|
||||
|
||||
m_BoneTransformationMatrix =
|
||||
XMMatrixAffineTransformation(vScale, XMVectorSet(0.f, 0.f, 0.f, 1.f), vRotation, vTranslation);
|
||||
|
||||
@@ -250,8 +253,6 @@ void CChannel::ResetRootMotion()
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
KEYFRAME* CChannel::Get_Frame(_uint iIndex)
|
||||
{
|
||||
return &m_KeyFrames[iIndex];
|
||||
@@ -262,31 +263,6 @@ void CChannel::Set_Frame(_uint iIndex, KEYFRAME& kf)
|
||||
m_KeyFrames[iIndex] = kf;
|
||||
}
|
||||
|
||||
|
||||
HRESULT CChannel::Initialize(HANDLE hFile, DWORD& dwByte)
|
||||
{
|
||||
_uint iLength = { 0 };
|
||||
if (!ReadFile(hFile, &iLength, sizeof(_uint), &dwByte, nullptr)) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (!ReadFile(hFile, m_szName, iLength, &dwByte, nullptr)) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (!ReadFile(hFile, &m_iBoneIndex, sizeof(_int), &dwByte, nullptr)) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (!ReadFile(hFile, &m_iNumKeyFrames, sizeof(_uint), &dwByte, nullptr)) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_KeyFrames.resize(m_iNumKeyFrames);
|
||||
for (_uint i = 0; i < m_iNumKeyFrames; ++i) {
|
||||
if (!ReadFile(hFile, &m_KeyFrames[i], sizeof(KEYFRAME), &dwByte, nullptr)) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CChannel::Initialize(const CModel* pModel, SaveChannel* pSaveChannel)
|
||||
{
|
||||
strcpy_s(m_szName, pSaveChannel->ChannelName.c_str());
|
||||
|
||||
Reference in New Issue
Block a user