diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp index 36da91f60..97d9f408c 100644 --- a/Jusin154_Team3D/Client/Private/Loader.cpp +++ b/Jusin154_Team3D/Client/Private/Loader.cpp @@ -1789,7 +1789,7 @@ HRESULT CLoader::Loading_For_GamePlay() Desc.ePxMaterialTypes = { PXMATERIAL::DEFAULT }; Desc.vMatInfo = { 0.5f, 0.5f, 0.001f }; Desc.fContactOffset = { 0.005f }; - Desc.vhalfGeometryInfo = { 0.025f, 0.075f, 0.f }; + Desc.vhalfGeometryInfo = { 0.025f, 0.085f, 0.f }; Desc.fDensity = 0.01f; Desc.pxMassCenter = PSX::PxTransform(PSX::PxIDENTITY()); Desc.eLockFlag = {}; @@ -1808,7 +1808,7 @@ HRESULT CLoader::Loading_For_GamePlay() Desc.ePxMaterialTypes = { PXMATERIAL::DEFAULT }; Desc.vMatInfo = { 0.5f, 0.5f, 0.01f }; Desc.fContactOffset = { 0.01f }; - Desc.vhalfGeometryInfo = { 0.06f, 0.25f, 0.f }; + Desc.vhalfGeometryInfo = { 0.12f, 0.25f, 0.f }; Desc.fDensity = 122.f; Desc.pxMassCenter = PSX::PxTransform(PSX::PxIDENTITY()); Desc.eLockFlag = {}; diff --git a/Jusin154_Team3D/Client/Private/PlayerRobe.cpp b/Jusin154_Team3D/Client/Private/PlayerRobe.cpp index e5a252cc0..39f0d26f8 100644 --- a/Jusin154_Team3D/Client/Private/PlayerRobe.cpp +++ b/Jusin154_Team3D/Client/Private/PlayerRobe.cpp @@ -34,24 +34,6 @@ void CPlayerRobe::Late_Update(_float fTimeDelta) if (true == bBroken) { assert(false); } - - const PSX::PxU32 shapeCount = m_pRobeJointRoute[i]->Get_Actor()->getNbShapes(); - std::vector shapePointerArray(shapeCount, nullptr); - - // (out) shapePointerArray에 shape 포인터들이 채워짐 - const PSX::PxU32 writtenCount = m_pRobeJointRoute[i]->Get_Actor()->getShapes(shapePointerArray.data(), shapeCount); - - for (PSX::PxU32 shapeIndex = 0; shapeIndex < writtenCount; ++shapeIndex) { - PSX::PxShape* shapePointer = shapePointerArray[shapeIndex]; - if (shapePointer == nullptr) { - continue; - } - - PSX::PxTransform shapeLocalPose = shapePointer->getLocalPose(); - shapeLocalPose.p; - shapeLocalPose.q; - // 여기서 shapeLocalPose.p / shapeLocalPose.q 를 찍어서 확인 - } } m_pGameInstance->Add_RenderGroup(RENDER::NONLIGHT, this); #endif // _DEBUG @@ -65,7 +47,13 @@ HRESULT CPlayerRobe::Render() HRESULT CPlayerRobe::Update_RobeSocketPosition() { - + PSX::PxTransform pxTransform = {}; + _matrix WorldMatrix = {}; + for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) { + pxTransform = m_pRobeJointAnchor[i]->Get_GlobalPosition(); + WorldMatrix = XMMatrixAffineTransformation(XMVectorSet(1.f, 1.f, 1.f, 0.f), XMVectorZero(), XMLoadFloat4((_float4*)&pxTransform.q), XMVectorSetW(XMLoadFloat3((_float3*)&pxTransform.p), 1.f)); + m_pModelCom->Set_BoneCombinedTransformation(PLAYER_JOINT_BONE_NAMES[i], WorldMatrix); + } return S_OK; } diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable.bin index 3ee77c4f0..401c670b0 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:84538ab6762b9c122113c1abba8fd954a82ae3e1c856e0c84a1d1c8fea895fdb +oid sha256:19fe722384b732f55bddc9ac5d09f0d50c2a81c76bd7b8c580378f6fa077ca92 size 10364804 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable.fbx index 21913d875..bb404edba 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable.fbx +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable.fbx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e03bcddb5568d27e9dc1f59f7a3c233c49b65f9636e4ee6d69c8e1704fe0313a -size 5730620 +oid sha256:32213c93d4cc6a61dd1bfcdb4193bfa76ddb1df6446e1ab1dfeab4d5ff522efd +size 5730924 diff --git a/Jusin154_Team3D/Editor/Private/Level_Logo.cpp b/Jusin154_Team3D/Editor/Private/Level_Logo.cpp index 6936ac8b1..a297cbb4f 100644 --- a/Jusin154_Team3D/Editor/Private/Level_Logo.cpp +++ b/Jusin154_Team3D/Editor/Private/Level_Logo.cpp @@ -60,7 +60,7 @@ void CLevel_Logo::Update(_float fTimeDelta) return; #endif // gimch #ifdef 기무리 - if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, LEVEL::PHYSX)))) + if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, LEVEL::OBJECT)))) return; #endif // 기무리 #ifdef 진우 diff --git a/Jusin154_Team3D/Editor/Private/Loader.cpp b/Jusin154_Team3D/Editor/Private/Loader.cpp index 906ea816b..4c99cd703 100644 --- a/Jusin154_Team3D/Editor/Private/Loader.cpp +++ b/Jusin154_Team3D/Editor/Private/Loader.cpp @@ -2542,9 +2542,9 @@ HRESULT CLoader::Loading_For_ObjectViewer() CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/GoblinSpector/GoblinSpector_Anim.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) return E_FAIL; - if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Playable_Model"), - CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable.bin", XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) - return E_FAIL; + //if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Playable_Model"), + // CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable.bin", XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity())))) + // return E_FAIL; futures.emplace_back(Deferred_ModelLoad( MODEL::ANIM, "../Bin/Resources/Models/Monster/TombProtector/TombProtector.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixIdentity(), @@ -2631,10 +2631,10 @@ HRESULT CLoader::Loading_For_ObjectViewer() TEXT("Prototype_Component_GerboldOlivander_Model") )); - //futures.emplace_back(Deferred_ModelLoad( - // MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable.bin",XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity(), - // TEXT("Prototype_Component_Playable_Model") - //)); + futures.emplace_back(Deferred_ModelLoad( + MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable.bin",XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + TEXT("Prototype_Component_Playable_Model") + )); /*futures.emplace_back(Deferred_ModelLoad( MODEL::ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable_Cmbt.fbx", XMMatrixIdentity(), diff --git a/Jusin154_Team3D/Engine/Private/Model.cpp b/Jusin154_Team3D/Engine/Private/Model.cpp index b3052312a..065e6c5de 100644 --- a/Jusin154_Team3D/Engine/Private/Model.cpp +++ b/Jusin154_Team3D/Engine/Private/Model.cpp @@ -559,9 +559,9 @@ const _float4x4* CModel::Get_BoneLocalMatrixPtr(const _char* pBoneName) return nullptr; } - //Mark_CPUChain(boneIdx); + Mark_CPUChain(boneIdx); - //Apply_CPUMask_ToBones(); + Apply_CPUMask_ToBones(); return m_Bones[boneIdx]->Get_TransformationMatrixPtr(); } @@ -638,6 +638,16 @@ _int CModel::Find_BoneIndex(const _char* pBoneName) return -1; } +HRESULT CModel::Set_BoneCombinedTransformation(const _char* pBoneName, _fmatrix newTransformation) +{ + _int iBoneIndex = Find_BoneIndex(pBoneName); + if (iBoneIndex < 0) { + return E_FAIL; + } + m_Bones[iBoneIndex]->Set_CombinedTransformationMatrix(newTransformation); + return S_OK; +} + void CModel::Set_CurrentTrackPosition(_float TrackPosition) { diff --git a/Jusin154_Team3D/Engine/Public/Bone.h b/Jusin154_Team3D/Engine/Public/Bone.h index 1a27246bd..4f57e7e3a 100644 --- a/Jusin154_Team3D/Engine/Public/Bone.h +++ b/Jusin154_Team3D/Engine/Public/Bone.h @@ -15,12 +15,8 @@ class ENGINE_DLL CBone final : public CBase _float4x4* Get_CombinedTransformationMatrixPtr() { return &m_CombinedTransformationMatrix; } _float4x4* Get_TransformationMatrixPtr() { return &m_TransformationMatrix; }; - void Set_CombinedTransformationMatrixPtr(_matrix& newMatrix) { - return XMStoreFloat4x4(&m_CombinedTransformationMatrix, newMatrix); - } - _bool Compare_Name(const _char* pBoneName) const { - return !strcmp(pBoneName, m_strName.c_str()); - } + void Set_CombinedTransformationMatrix(_fmatrix newMatrix) { return XMStoreFloat4x4(&m_CombinedTransformationMatrix, newMatrix); } + _bool Compare_Name(const _char* pBoneName) const { return !strcmp(pBoneName, m_strName.c_str()); } void Get_KeyFrame(KEYFRAME& kf, _bool bIsCurrentFrame); // 현재 본의 로컬매트릭스를 캡쳐해서 키프레임으로 성분 분해하여 올려보낸다. const _char* Get_Name() const { return m_strName.c_str(); } _float3 Get_LocalPosition(); diff --git a/Jusin154_Team3D/Engine/Public/Model.h b/Jusin154_Team3D/Engine/Public/Model.h index 17c281ff4..5c241a101 100644 --- a/Jusin154_Team3D/Engine/Public/Model.h +++ b/Jusin154_Team3D/Engine/Public/Model.h @@ -95,6 +95,7 @@ class ENGINE_DLL CModel final : public CComponent void Combined_BoneMatrix(); void Combined_BoneMatrix(_int iStartBoneIndex, _uint iBoneCount); _int Find_BoneIndex(const _char* pBoneName); + HRESULT Set_BoneCombinedTransformation(const _char* pBoneName, _fmatrix newTransformation); #pragma endregion #pragma region Material