From 0b68857d0edd11d9d85f42de2cae11600eb64337 Mon Sep 17 00:00:00 2001 From: GiJungSUk Date: Wed, 26 Nov 2025 13:30:20 +0900 Subject: [PATCH 1/6] commit_13:30_1126 --- .../Data/Effect/Bombard/Bombard_Circle0.bin | 2 +- .../Data/Effect/Bombard/Bombard_Circle1.bin | 2 +- .../Data/Effect/Bombard/Bombard_Explosion.bin | 2 +- .../Data/Effect/Bombard/Bombard_PT_0.bin | 4 +- .../Data/Effect/Bombard/Bombard_PT_1.bin | 2 +- .../Data/Effect/Bombard/Bombard_PT_2.bin | 2 +- .../Data/Effect/Bombard/Bombard_PT_3.bin | 2 +- .../Effect/Bombard/Bombard_Projectile.bin | 2 +- .../Data/Effect/Bombard/Bombard_Smoke.bin | 2 +- .../Data/Effect/Decendo/Decendo_Down.bin | 2 +- .../Data/Effect/Decendo/Decendo_PT0.bin | 2 +- .../Data/Effect/Decendo/Decendo_Ring.bin | 2 +- Jusin154_Team3D/Editor/Private/Bombard.cpp | 11 +++- Jusin154_Team3D/Editor/Private/Decendo.cpp | 51 ++++++++++----- .../Editor/Private/Dummy_PhysXPlayable.cpp | 16 ----- Jusin154_Team3D/Editor/Private/EditEffect.cpp | 7 ++- .../Editor/Private/Effect_Container.cpp | 6 ++ .../Editor/Private/Effect_Editor.cpp | 8 ++- .../Editor/Private/Level_EffectViewer.cpp | 18 ++---- Jusin154_Team3D/Editor/Private/Loader.cpp | 63 +++++++++++++++++++ Jusin154_Team3D/Editor/Private/Player.cpp | 2 +- .../Editor/Private/Player_States.cpp | 15 +++++ .../Editor/Private/TrailObject.cpp | 20 ++++-- Jusin154_Team3D/Editor/Private/Wand.cpp | 42 +++++++++++++ Jusin154_Team3D/Editor/Public/Decendo.h | 2 + Jusin154_Team3D/Editor/Public/TrailObject.h | 8 +-- Jusin154_Team3D/Editor/Public/Wand.h | 4 ++ .../Engine/Private/Instance_Model.cpp | 3 +- 28 files changed, 227 insertions(+), 75 deletions(-) diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Circle0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Circle0.bin index 825a7e1f2..0fa18c95b 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Circle0.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Circle0.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0d7c85b004730f89e4547705e9b9de398f8553edd1efc70bdded9cf1b81847e4 +oid sha256:754caa56185a9683f175deb1e34831a53349587aedf7ac0bc93ef466fa15c0b8 size 819 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Circle1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Circle1.bin index f799ddb0d..43ec056e2 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Circle1.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Circle1.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b46202f3f9823d33771846b7b64eb8807a0ff5c9243dcc947a35092c92b11045 +oid sha256:4dc1e9e0bd020e0c98378cbb90ea65f5c9930568908812ee8ff7f3e695490dbe size 776 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Explosion.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Explosion.bin index 652a2f211..f4e36d521 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Explosion.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Explosion.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:329b50942dddd66f3c3a40e652fe35c9f8d000e44158997d5fed1d8db928b17a +oid sha256:cef1aebbbb64f24cce1550d2234550fc2c354fd7aa286a72ec16a46e4ff25a71 size 770 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_0.bin index 2ea5b1e6d..960e86eef 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_0.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_0.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5ce3696e97955d927c02b5a63e85cca6c10084ffde761389273188af4788c677 -size 774 +oid sha256:c68075ff2041596f7d7574f0be8b48367a4d42fb1ad548db57cf253de4071763 +size 778 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_1.bin index 06cfcd7bb..9464c0966 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_1.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_1.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:13372a3576de4fc092b4afc46c01f6a427bbf2d5907a38c09d56e31c0b2596da +oid sha256:321ee693cd5c01c35c482b82be3b304ac1ed29277f7d7c1b1d2ca69151f4704b size 778 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_2.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_2.bin index 4b91066c0..d12e8a363 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_2.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_2.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8ab1f04c0142857e65e8cdf856214d9ed36c522be91ca6d34816a0c48aa32525 +oid sha256:97ce02c72164faadf0153679fc7cf42ed48a22b04de08a811d42492d4cecaa05 size 770 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_3.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_3.bin index b9d85e2b2..c24651849 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_3.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_PT_3.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:509cffbba0ca745b6575f0b4de66ce481b1fec55372fb51de2d718fbe6984a33 +oid sha256:fd6e6b5e71527fb367accc029e84d83fe62c3907021714b3384a4d6e9dad0957 size 770 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Projectile.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Projectile.bin index 3e815629b..98015a1f7 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Projectile.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Projectile.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9d68cacfcaebe037fc9980596613e8c99bd4ea6bcd4265f96d9cd71dd8abdf35 +oid sha256:1a6b6dc4ee34b88588ba3d076840eb444b4b0a7029e8f1249140e9e3cccd3790 size 875 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Smoke.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Smoke.bin index 5a9c2904f..4abc0ebe5 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Smoke.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Bombard/Bombard_Smoke.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f788da19a24931cb6e22a61aace58669097cc9f8f729fc4629cf5f7f4c6fd76c +oid sha256:bd8765534c44aa3dbe9663aaa928f3ff6d906cf895a38eb8562ae09854945d05 size 725 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_Down.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_Down.bin index 82a5a8c9c..14baaf1eb 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_Down.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_Down.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9836013dc2e13c84c376fe461796105155554324e2a1bc70e565e15a900489dc +oid sha256:83a2ffb062848b8a6b0d818ee27019e73c8a2dc9d50e57fb5321fe60065968ab size 788 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_PT0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_PT0.bin index 701b18b04..e3c99517d 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_PT0.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_PT0.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d9ac13cd73b0f8e2d23935c420c6efe4d3f7cb921a142faa8dd38300b313421b +oid sha256:ebccf9cd0439a24609e73e5e828c7bbbdf4f41885ef2b9ff7420c89a3aa4633a size 774 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_Ring.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_Ring.bin index e853f02d7..4e7ec51a8 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_Ring.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Decendo/Decendo_Ring.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:597a8216d073b115ffb3f853cb55218676ade6011b798f7d4e1db752e4208597 +oid sha256:c8a313614069d2521f54a9122859bdd4b35c14fdf194ea2ebf979e209a05cdd8 size 728 diff --git a/Jusin154_Team3D/Editor/Private/Bombard.cpp b/Jusin154_Team3D/Editor/Private/Bombard.cpp index 0e293e18f..2af609ee6 100644 --- a/Jusin154_Team3D/Editor/Private/Bombard.cpp +++ b/Jusin154_Team3D/Editor/Private/Bombard.cpp @@ -105,9 +105,18 @@ HRESULT CBombard::Ready_Child() XMStoreFloat3(&Desc.vPos, m_pOwner->Get_WorldPostion() + XMVectorSet(0.f, 0.f, 1.f, 0.f)); + + _vector vOwnerLook = m_pOwner->Get_Component()->Get_State(STATE::LOOK); + + _float3 vDir = {}; + + XMStoreFloat3(&Desc.vPos, m_pOwner->Get_WorldPostion() + XMVectorSet(0.f, 0.f, 1.f, 0.f)); + + XMStoreFloat3(&vDir, vOwnerLook * 2.f); + Desc.vRotRPY = { 0.f, 0.f, 0.f }; Desc.iSubKind = 70; - Desc.vDeltaPos = { 0.f, 0.f, 2.f }; + Desc.vDeltaPos = vDir; Desc.vLifeTime = { 0.f, 2.f }; if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, CURRENT_LEVEL, LAYER_HITBOX, &Desc, this , &m_pPhysHitBox))) { diff --git a/Jusin154_Team3D/Editor/Private/Decendo.cpp b/Jusin154_Team3D/Editor/Private/Decendo.cpp index d4bc1b129..3953a1bcb 100644 --- a/Jusin154_Team3D/Editor/Private/Decendo.cpp +++ b/Jusin154_Team3D/Editor/Private/Decendo.cpp @@ -39,7 +39,7 @@ HRESULT CDecendo::Initialize(void* pArg) return E_FAIL; - m_wstrEffectName = L"Bombard"; + m_wstrEffectName = L"Decendo"; m_pProjectile_Blur = Get_PartObject("Decendo_Proj_Blur"); m_pProjectile = Get_PartObject("Decendo_Proj"); @@ -50,8 +50,6 @@ HRESULT CDecendo::Initialize(void* pArg) m_pProjectile->Get_Component()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion()); m_pProjectile_Blur->Get_Component()->Set_State(STATE::POSITION, m_pOwner->Get_WorldPostion()); - Get_PartObject()->Set_Target(m_pProjectile->Get_Component()); - pCircle0->Set_Visible(true); m_pProjectile->Set_Visible(true); m_pProjectile_Blur->Set_Visible(true); @@ -60,11 +58,11 @@ HRESULT CDecendo::Initialize(void* pArg) SAFE_ADDREF(m_pProjectile); //나아가는 벡터와 한점을 가져와 수직인 평면상에 하나의 점으로 DIR 을 만듬 - _vector vOwnerLook = XMVector3Normalize(m_pOwner->Get_Component()->Get_State(STATE::LOOK)); + m_vOwnerLook = XMVector3Normalize(m_pOwner->Get_Component()->Get_State(STATE::LOOK)); _vector vUp = XMVectorSet(0.f, 1.f, 0.f, 0.f); - _vector vQuaternion = XMQuaternionRotationAxis(vOwnerLook, m_pGameInstance->Random_Float(0.f, XM_PIDIV2)); + _vector vQuaternion = XMQuaternionRotationAxis(m_vOwnerLook, m_pGameInstance->Random_Float(0.f, XM_PIDIV2)); m_vRotateUp = XMVector3Rotate(vUp, vQuaternion); @@ -90,19 +88,19 @@ void CDecendo::Update(_float fTimeDelta) Update_Event(fTimeDelta); - _vector vOwnerLook = m_pOwner->Get_Component()->Get_State(STATE::LOOK); - m_pProjectile_Blur->Get_Component()->Translation(vOwnerLook * 1.f); - m_pProjectile->Get_Component()->Translation(vOwnerLook * 1.f); + m_pProjectile_Blur->Get_Component()->Translation(m_vOwnerLook * 0.5f); + m_pProjectile->Get_Component()->Translation(m_vOwnerLook * 0.5f); - - if (m_fAccTime > XM_PI) + Get_PartObject()->Trail_Update(m_pProjectile->Get_Component()->Get_XMWorldMatrix(), fTimeDelta); + + if (m_fAccTime > XM_2PI) return; - m_fAccTime += fTimeDelta * 3.f; + m_fAccTime += fTimeDelta * 7.5f; - m_pProjectile_Blur->Get_Component()->Translation(m_vRotateUp * 1.f * sinf(m_fAccTime)); - m_pProjectile->Get_Component()->Translation(m_vRotateUp * 1.f * sinf(m_fAccTime)); + m_pProjectile_Blur->Get_Component()->Translation(m_vRotateUp * 0.2f * sinf(m_fAccTime)); + m_pProjectile->Get_Component()->Translation(m_vRotateUp * 0.2f * sinf(m_fAccTime)); } @@ -132,9 +130,17 @@ HRESULT CDecendo::Ready_Child() XMStoreFloat3(&Desc.vPos, m_pOwner->Get_WorldPostion() + XMVectorSet(0.f, 0.f, 1.f, 0.f)); + _vector vOwnerLook = m_pOwner->Get_Component()->Get_State(STATE::LOOK); + + _float3 vDir = {}; + + XMStoreFloat3(&Desc.vPos, m_pOwner->Get_WorldPostion() + XMVectorSet(0.f, 0.f, 1.f, 0.f)); + + XMStoreFloat3(&vDir , vOwnerLook * 0.5f); + Desc.vRotRPY = { 0.f, 0.f, 0.f }; Desc.iSubKind = 70; - Desc.vDeltaPos = { 0.f, 0.f, 1.f }; + Desc.vDeltaPos = vDir ; Desc.vLifeTime = { 0.f, 1.f }; if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, CURRENT_LEVEL, LAYER_HITBOX, &Desc, this , &m_pPhysHitBox))) { @@ -177,6 +183,7 @@ void CDecendo::OnCollision(CGameObject* pOther , void* pDesc) //CTransform* pOtherTransform = p ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc); + for (auto& pPair : m_PartObjects) { pPair.second->Set_Visible(true); @@ -185,7 +192,13 @@ void CDecendo::OnCollision(CGameObject* pOther , void* pDesc) m_pProjectile_Blur->Set_Visible(false); m_pProjectile->Set_Visible(false); - + + + + _vector vPlayerPos = m_pOwner->Get_Component()->Get_State(STATE::POSITION); + + Get_PartObject("Decendo_Down")->Get_Component()->LookAt(vPlayerPos); + Get_PartObject("Decendo_Cricle_S")->Set_Visible(false); Get_PartObject()->Set_Visible(false); @@ -208,7 +221,15 @@ void CDecendo::Free() void CDecendo::Describe_Entity() { + GUI::Begin("VALUE"); + _float4 vValue = {}; + + if (GUI::InputFloat("TurnValue", (_float*)&m_fTurnValue)) + { + } + + GUI::End(); } HRESULT CDecendo::Bind_ShaderResources() diff --git a/Jusin154_Team3D/Editor/Private/Dummy_PhysXPlayable.cpp b/Jusin154_Team3D/Editor/Private/Dummy_PhysXPlayable.cpp index ca5023e47..bc676089f 100644 --- a/Jusin154_Team3D/Editor/Private/Dummy_PhysXPlayable.cpp +++ b/Jusin154_Team3D/Editor/Private/Dummy_PhysXPlayable.cpp @@ -55,23 +55,7 @@ void CDummy_PhysXPlayable::Update(_float fTimeDelta) m_pGameInstance->Attach_Actor(*m_pCharacter_Controller->Get_Actor()); } } - if (m_pGameInstance->Key_Up(DIK_O)) { - { - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(ENUM_CLASS(LEVEL::EFFECT), CURRENT_LEVEL, LAYER_HITBOX, nullptr, this))) { - assert(false); - return; - } - } - } - if (m_pGameInstance->Key_Up(DIK_P)) { - { - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(ENUM_CLASS(LEVEL::EFFECT), CURRENT_LEVEL, LAYER_HITBOX, nullptr, this))) { - assert(false); - return; - } - } - } m_pTransformCom->AccumulateMomentum(XMVectorSet(0.f, -GRAVITY * fTimeDelta, 0.f, 0.f)); m_pCharacter_Controller->Move(fTimeDelta); } diff --git a/Jusin154_Team3D/Editor/Private/EditEffect.cpp b/Jusin154_Team3D/Editor/Private/EditEffect.cpp index b5351a9f9..801e7b269 100644 --- a/Jusin154_Team3D/Editor/Private/EditEffect.cpp +++ b/Jusin154_Team3D/Editor/Private/EditEffect.cpp @@ -49,9 +49,6 @@ void CEditEffect::Update(_float fTimeDelta) m_pInstance_ModelCom->Drop(fTimeDelta); - if (m_EffectInfo.isBillboard) - m_pGameInstance->BillBoard(m_pTransformCom); - } @@ -64,6 +61,10 @@ void CEditEffect::Late_Update(_float fTimeDelta) if (m_pInstance_ModelCom == nullptr) return; + if (m_EffectInfo.isBillboard) + m_pGameInstance->BillBoard(m_pTransformCom); + + if (m_isGoStraight == true) { diff --git a/Jusin154_Team3D/Editor/Private/Effect_Container.cpp b/Jusin154_Team3D/Editor/Private/Effect_Container.cpp index 9517c1973..e5d93cd6f 100644 --- a/Jusin154_Team3D/Editor/Private/Effect_Container.cpp +++ b/Jusin154_Team3D/Editor/Private/Effect_Container.cpp @@ -4,6 +4,7 @@ #include "GameInstance.h" #include "EditEffect.h" #include "TrailObject.h" +#include "GameObject.h" #include @@ -215,6 +216,11 @@ void CEffect_Container::Update_Event(_float fTimeDelta) else { m_bVisible = false; + + for (auto& pPart : m_PartObjects) + { + pPart.second->Set_Visible(false); + } } } diff --git a/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp b/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp index 5d24c5159..83bdb5257 100644 --- a/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp +++ b/Jusin154_Team3D/Editor/Private/Effect_Editor.cpp @@ -81,7 +81,13 @@ void CEffect_Editor::Update(_float fTimeDelta) if (m_pGameInstance->Key_Pressing(DIK_Z)) m_pTransformCom->Turn(XMVectorSet(0.f, 1.f, 0.f, 0.f), fTimeDelta); - Update_Event(fTimeDelta); + /* 이펙트 컨테이너 업데이트 */ + //Update_Event(fTimeDelta); + + /* 트레일 업데이트 */ + if (m_pTrailObject != nullptr) + m_pTrailObject->Trail_Update(m_pTransformCom->Get_XMWorldMatrix(), fTimeDelta); + } void CEffect_Editor::Late_Update(_float fTimeDelta) diff --git a/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp b/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp index 4a7be6356..717186f77 100644 --- a/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp +++ b/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp @@ -13,6 +13,7 @@ #include "Dummy_PhysXPlayable.h" #include "Dummy_PhysXMonster.h" #include "Dummy_PhysXWall.h" +#include "Player.h" CLevel_EffectViewer::CLevel_EffectViewer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID) : CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) } @@ -46,11 +47,11 @@ HRESULT CLevel_EffectViewer::Initialize() if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(ENUM_CLASS(LEVEL::EFFECT), NEXT_LEVEL, LAYER_CUBE))) return E_FAIL; - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(ENUM_CLASS(LEVEL::EFFECT), NEXT_LEVEL, LAYER_CUBE))) + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_PLAYER))) return E_FAIL; - //if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Sky")))) - // return E_FAIL; + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Sky")))) + return E_FAIL; return S_OK; @@ -130,6 +131,7 @@ HRESULT CLevel_EffectViewer::Ready_Layer_PhysX(const _wstring& strLayerTag) return E_FAIL; } } + { CDummy_PhysXWall::PHYSXDUMMY_DESC Desc{}; Desc.vPos = { -15.f, 3.f, 15.f }; @@ -140,15 +142,7 @@ HRESULT CLevel_EffectViewer::Ready_Layer_PhysX(const _wstring& strLayerTag) return E_FAIL; } } - { - CDummy_PhysXPlayable::PHYSXDUMMY_DESC Desc{}; - Desc.vPos = { 0.f, 100.f, 0.f }; - Desc.vRotRPY = { 0.f, 0.f, 0.f }; - Desc.iSubKind = 10; - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_PLAYER, &Desc))) { - return E_FAIL; - } - } + { CDummy_PhysXMonster::PHYSXDUMMY_DESC Desc{}; Desc.vPos = { 0.f, 150.f, 5.f }; diff --git a/Jusin154_Team3D/Editor/Private/Loader.cpp b/Jusin154_Team3D/Editor/Private/Loader.cpp index 601467879..ca05c80e9 100644 --- a/Jusin154_Team3D/Editor/Private/Loader.cpp +++ b/Jusin154_Team3D/Editor/Private/Loader.cpp @@ -788,6 +788,33 @@ HRESULT CLoader::Loading_For_Effect() return E_FAIL; + vector*>> futures = {}; + + futures.emplace_back(Deferred_ModelLoad( + MODEL::NONANIM, "../Bin/Resources/Models/SkyBox/SkyBox.fbx", XMMatrixIdentity(), + TEXT("Prototype_Component_SkyboxModel") + )); + + futures.emplace_back(Deferred_ModelLoad( + MODEL::ANIM, "../Bin/Resources/Models/Human/Npc/Npc.bin", XMMatrixRotationY(XMConvertToRadians(180.f))* XMMatrixIdentity(), + TEXT("Prototype_Component_Npc_Model") + )); + + futures.emplace_back(Deferred_ModelLoad( + MODEL::ANIM, "../Bin/Resources/Models/Object/Wand/Wand.fbx", XMMatrixScaling(0.01f, 0.01f, 0.01f)* XMMatrixIdentity(), + TEXT("Prototype_Component_Wand_Model") + )); + + for (auto& job : futures) { + pair<_wstring, CModel*>* pResult = job.get(); + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, pResult->first, pResult->second))) { + assert(false); + return E_FAIL; + } + Safe_Delete(pResult); + } + + m_strMessage = TEXT("Shader Loading.."); @@ -854,6 +881,42 @@ HRESULT CLoader::Loading_For_Effect() return E_FAIL; + /* For.Prototype_GameObject_Wand */ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CWand::Create(m_pDevice, m_pContext)))) + return E_FAIL; + + /* For.Prototype_Component_FSM */ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CFSM::Create(m_pDevice, m_pContext)))) + return E_FAIL; + + /* For.Prototype_GameObject_CamPosition_Arm */ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CCamPosition_Arm::Create(m_pDevice, m_pContext)))) + return E_FAIL; + + /* For.Prototype_GameObject_Camera_Gaze */ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CCamera_Gaze::Create(m_pDevice, m_pContext)))) + return E_FAIL; + + /* For.Prototype_GameObject_CamPosition_Player */ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CCamPosition_Socket::Create(m_pDevice, m_pContext)))) + return E_FAIL; + + /* For.Prototype_GameObject_CamPosition_Shoulder */ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CCamPosition_Shoulder::Create(m_pDevice, m_pContext)))) + return E_FAIL; + + /* For.Prototype_GameObject_CamPosition_Target */ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CCamPosition_Target::Create(m_pDevice, m_pContext)))) + return E_FAIL; + + /* For.Prototype_GameObject_Player */ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CPlayer::Create(m_pDevice, m_pContext)))) + return E_FAIL; + + + + + m_strMessage = TEXT("Loading Success!"); m_isFinished = true; diff --git a/Jusin154_Team3D/Editor/Private/Player.cpp b/Jusin154_Team3D/Editor/Private/Player.cpp index 05d61f5c8..fb200e130 100644 --- a/Jusin154_Team3D/Editor/Private/Player.cpp +++ b/Jusin154_Team3D/Editor/Private/Player.cpp @@ -98,7 +98,7 @@ void CPlayer::Late_Update(_float fTimeDelta) { m_pTransformCom->Set_State(STATE::POSITION, m_pCharacter_Controller->Get_Position()); - m_pGameInstance->Add_RenderGroup(RENDER::BLEND, this); + m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this); __super::Late_Update(fTimeDelta); } diff --git a/Jusin154_Team3D/Editor/Private/Player_States.cpp b/Jusin154_Team3D/Editor/Private/Player_States.cpp index b91b2122e..b5389679f 100644 --- a/Jusin154_Team3D/Editor/Private/Player_States.cpp +++ b/Jusin154_Team3D/Editor/Private/Player_States.cpp @@ -21,6 +21,7 @@ #pragma endregion #include "Bombard.h" +#include "Decendo.h" #pragma region States void CPlayer::TestKeyInput(_float fTimeDelta) @@ -526,9 +527,23 @@ HRESULT CPlayer::Behavior_CombatExitCheck() { case STATEANIM::ACCIO: pairAnimInfo = m_Animation[STATEANIM::ACCIO]; + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(ENUM_CLASS(LEVEL::EFFECT), CURRENT_LEVEL, LAYER_HITBOX, nullptr, this))) { + assert(false); + return E_FAIL; + } + + break; case STATEANIM::DESCENDO: + { pairAnimInfo = m_Animation[STATEANIM::DESCENDO]; + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(ENUM_CLASS(LEVEL::EFFECT), CURRENT_LEVEL, LAYER_HITBOX, nullptr, this))) { + assert(false); + return E_FAIL; + } + } break; default: break; diff --git a/Jusin154_Team3D/Editor/Private/TrailObject.cpp b/Jusin154_Team3D/Editor/Private/TrailObject.cpp index dfdc72f7f..faaa7dbe6 100644 --- a/Jusin154_Team3D/Editor/Private/TrailObject.cpp +++ b/Jusin154_Team3D/Editor/Private/TrailObject.cpp @@ -43,7 +43,6 @@ void CTrailObject::Update(_float fTimeDelta) if (m_bVisible == false) return; - m_pTrailCom->Trail_Update(fTimeDelta, m_pParentTransformCom->Get_XMWorldMatrix()); if (m_TrailInfo.vDistortionTime.y == 0) @@ -85,8 +84,14 @@ void CTrailObject::Set_Target(CTransform* pTargetTransform) m_pParentTransformCom = pTargetTransform; } +void CTrailObject::Trail_Update(_fmatrix WorldMat, _float fTimeDelta) +{ + m_pTrailCom->Trail_Update(fTimeDelta, WorldMat); +} + #ifdef _DEBUG + HRESULT CTrailObject::Save_Trail(const _char* pPath) { _string strPerfectFilePath = pPath; @@ -332,11 +337,12 @@ HRESULT CTrailObject::Ready_Components(void* pArg) HRESULT CTrailObject::Render() { + if (FAILED(Bind_ShaderResources())) + return E_FAIL; + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_POSTEX::TRAIL)))) return E_FAIL; - if (FAILED(Bind_ShaderResources())) - return E_FAIL; if (FAILED(m_pTrailCom->Render())) return E_FAIL; @@ -346,9 +352,11 @@ HRESULT CTrailObject::Render() HRESULT CTrailObject::Render_Blur() { - if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_POSTEX::TRAIL_BLUR)))) + + if (FAILED(Bind_ShaderResources())) return E_FAIL; + if (FAILED(m_pShaderCom->Bind_RawValue("g_fBlurIntensity", &m_TrailInfo.fBlurIntensity, sizeof(_float)))) { return E_FAIL; } @@ -357,9 +365,11 @@ HRESULT CTrailObject::Render_Blur() return E_FAIL; } - if (FAILED(Bind_ShaderResources())) + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_POSTEX::TRAIL_BLUR)))) return E_FAIL; + + if (FAILED(m_pTrailCom->Render())) return E_FAIL; diff --git a/Jusin154_Team3D/Editor/Private/Wand.cpp b/Jusin154_Team3D/Editor/Private/Wand.cpp index 1c904ec41..6c085e83f 100644 --- a/Jusin154_Team3D/Editor/Private/Wand.cpp +++ b/Jusin154_Team3D/Editor/Private/Wand.cpp @@ -2,6 +2,8 @@ #include "Wand.h" #include "GameInstance.h" +#include "EditEffect.h" +#include "TrailObject.h" CWand::CWand(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) : CPartObject(pDevice, pContext) @@ -30,6 +32,27 @@ HRESULT CWand::Initialize(void* pArg) if (FAILED(Ready_Components())) return E_FAIL; + CPartObject::PARTOBJECT_DESC PartsDesc{}; + + PartsDesc.pParentTransform = m_pTransformCom; + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(NEXT_LEVEL, NEXT_LEVEL, TEXT("Layer_Trail"), &PartsDesc, this, &m_pTrail))) { + assert(false); + return E_FAIL; + } + + if (FAILED(m_pTrail->Load_Trail("../Bin/Resources/Data/Effect/Trail/Bombard_Trail", static_cast(NEXT_LEVEL)))) + return E_FAIL; + + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(NEXT_LEVEL, NEXT_LEVEL, TEXT("Layer_Effect"), &PartsDesc, this, &m_pEffectParts))) { + assert(false); + return E_FAIL; + } + + m_pEffectParts->Load("../Bin/Resources/Data/Effect/Lumos/Lumos", static_cast(NEXT_LEVEL)); + m_pEffectParts->Set_Visible(true); + return S_OK; } @@ -47,6 +70,24 @@ void CWand::Priority_Update(_float fTimeDelta) void CWand::Update(_float fTimeDelta) { + + Describe_Entity(); + + m_pModelCom->Combined_BoneMatrix(); + + _matrix BoneMatrix = XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("root")); + + BoneMatrix = BoneMatrix * m_pTransformCom->Get_XMWorldMatrix(); + + + BoneMatrix.r[3] += XMVector3Normalize(BoneMatrix.r[0]) * m_vOffset.x; + BoneMatrix.r[3] += XMVector3Normalize(BoneMatrix.r[1]) * m_vOffset.y; + BoneMatrix.r[3] += XMVector3Normalize(BoneMatrix.r[2]) * m_vOffset.z; + + m_pEffectParts->Get_Component()->Set_WorldMatrix(BoneMatrix); + + m_pTrail->Trail_Update(BoneMatrix, fTimeDelta); + } void CWand::Late_Update(_float fTimeDelta) @@ -159,4 +200,5 @@ void CWand::Free() void CWand::Describe_Entity() { + } diff --git a/Jusin154_Team3D/Editor/Public/Decendo.h b/Jusin154_Team3D/Editor/Public/Decendo.h index 51d73a282..156d4cadd 100644 --- a/Jusin154_Team3D/Editor/Public/Decendo.h +++ b/Jusin154_Team3D/Editor/Public/Decendo.h @@ -38,6 +38,8 @@ class CDecendo final : public CEffect_Container _vector m_vRotateUp = {}; _float m_fAccTime = {}; _float m_fLerpAmount = {}; + _float m_fTurnValue = {}; + _vector m_vOwnerLook = {}; public: static CDecendo* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual void Free() override; diff --git a/Jusin154_Team3D/Editor/Public/TrailObject.h b/Jusin154_Team3D/Editor/Public/TrailObject.h index 4e2878c29..70d17832d 100644 --- a/Jusin154_Team3D/Editor/Public/TrailObject.h +++ b/Jusin154_Team3D/Editor/Public/TrailObject.h @@ -70,13 +70,7 @@ class CTrailObject final : public CPartObject public: void Set_Target(class CTransform* pTargetTransform); - void Set_Target(_float4x4* pMatrix) - { - if (m_pParantsMatrix != nullptr) - { - m_pParantsMatrix = pMatrix; - } - } + void Trail_Update(_fmatrix WorldMat, _float fTimeDelta); public: #ifdef _DEBUG HRESULT Save_Trail(const _char* pPath); diff --git a/Jusin154_Team3D/Editor/Public/Wand.h b/Jusin154_Team3D/Editor/Public/Wand.h index 0bfdd513b..7b2859dd3 100644 --- a/Jusin154_Team3D/Editor/Public/Wand.h +++ b/Jusin154_Team3D/Editor/Public/Wand.h @@ -35,6 +35,10 @@ class CWand final : public CPartObject CShader* m_pShaderCom = { nullptr }; CModel* m_pModelCom = { nullptr }; + class CTrailObject* m_pTrail = { nullptr }; + class CEditEffect* m_pEffectParts = { nullptr }; + + _float3 m_vOffset = { 0.f , -0.3f ,0.f}; private: HRESULT Ready_Components(); diff --git a/Jusin154_Team3D/Engine/Private/Instance_Model.cpp b/Jusin154_Team3D/Engine/Private/Instance_Model.cpp index 6be1cc103..e4657a899 100644 --- a/Jusin154_Team3D/Engine/Private/Instance_Model.cpp +++ b/Jusin154_Team3D/Engine/Private/Instance_Model.cpp @@ -74,7 +74,7 @@ HRESULT CInstance_Model::Initialize_Prototype(const _char* pModelFilePath, MODEL return S_OK; } - +#ifdef EDITOR_PROJECT HRESULT CInstance_Model::Assimp_Model_Load(const _char* pModelFilePath, MODEL eType, _fmatrix& PreTransformMatrix, _uint iRootBoneIndex) { _uint iFlag = {}; @@ -103,6 +103,7 @@ HRESULT CInstance_Model::Assimp_Model_Load(const _char* pModelFilePath, MODEL eT return S_OK; #pragma endregion } +#endif #ifdef EDITOR_PROJECT HRESULT CInstance_Model::Ready_Meshes(MODEL eType, const aiScene* pAIScene, _fmatrix& PreTransformMatrix) From b75e3c8551e1f5ccf6af934feca53976f71a4948 Mon Sep 17 00:00:00 2001 From: kimnuri Date: Wed, 26 Nov 2025 13:36:16 +0900 Subject: [PATCH 2/6] [add] Release_Checked --- Jusin154_Team3D/Client/Private/Goblin.cpp | 3 ++ Jusin154_Team3D/Client/Private/Loader.cpp | 8 +-- Jusin154_Team3D/Client/Private/Monster.cpp | 3 ++ Jusin154_Team3D/Client/Private/Wand.cpp | 5 +- Jusin154_Team3D/Client/Public/Goblin.h | 3 ++ Jusin154_Team3D/Client/Public/Monster.h | 4 ++ .../Engine/Private/GameInstance.cpp | 4 ++ .../Engine/Private/Instance_Model.cpp | 49 ++++++++++++++++--- .../Engine/Private/Mouse_Manager.cpp | 4 +- .../Engine/Private/PhysX_Manager.cpp | 39 ++++++++++----- 10 files changed, 99 insertions(+), 23 deletions(-) diff --git a/Jusin154_Team3D/Client/Private/Goblin.cpp b/Jusin154_Team3D/Client/Private/Goblin.cpp index f7cbf1e00..a4f45ca5b 100644 --- a/Jusin154_Team3D/Client/Private/Goblin.cpp +++ b/Jusin154_Team3D/Client/Private/Goblin.cpp @@ -223,7 +223,10 @@ void CGoblin::Free() Safe_Delete(m_pCallBack_Behavior); Safe_Delete(m_pCallBack_HitReport); } +#ifdef _DEBUG void CGoblin::Describe_Entity() { } + +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp index dd1c74ebe..6e289de81 100644 --- a/Jusin154_Team3D/Client/Private/Loader.cpp +++ b/Jusin154_Team3D/Client/Private/Loader.cpp @@ -53,6 +53,7 @@ unsigned int APIENTRY LoadingMain(void* pArg) if (FAILED(pLoader->Loading())) { assert(false); + int a = 0; return 1; } @@ -271,7 +272,7 @@ HRESULT CLoader::Loading_For_GamePlay() } if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Box"), - CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/Box/Box.fbx", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixIdentity())))) { + CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/Box/Box.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixIdentity())))) { return E_FAIL; } @@ -321,7 +322,7 @@ HRESULT CLoader::Loading_For_GamePlay() if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_SkyboxModel"), - CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/SkyBox/SkyBox.fbx", XMMatrixIdentity())))) + CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/SkyBox/SkyBox.bin", XMMatrixIdentity())))) return E_FAIL; Asset_FileLoad("../Bin/Resources/Models/Effect/ParticleMesh", L"Prototype_Instance_Model_", [&](_wstring wstrFileName, const _char* pFilePath) { @@ -483,8 +484,9 @@ HRESULT CLoader::Asset_FileLoad(const _char* pDirectoryPath, const _tchar* pPreN string ext = file.path().extension().string(); - if (!strcmp(ext.c_str(), ".txt")) + if (!strcmp(ext.c_str(), ".txt") || !strcmp(ext.c_str(), ".fbx")){ continue; + } _char szFilePath[MAX_PATH] = {}; diff --git a/Jusin154_Team3D/Client/Private/Monster.cpp b/Jusin154_Team3D/Client/Private/Monster.cpp index 704992d98..2600aecab 100644 --- a/Jusin154_Team3D/Client/Private/Monster.cpp +++ b/Jusin154_Team3D/Client/Private/Monster.cpp @@ -73,7 +73,10 @@ void CMonster::Free() SAFE_RELEASE(m_pPlayerTransform); } +#ifdef _DEBUG void CMonster::Describe_Entity() { } + +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Wand.cpp b/Jusin154_Team3D/Client/Private/Wand.cpp index 73b51f396..f7bf9b126 100644 --- a/Jusin154_Team3D/Client/Private/Wand.cpp +++ b/Jusin154_Team3D/Client/Private/Wand.cpp @@ -50,6 +50,8 @@ HRESULT CWand::Initialize(void* pArg) assert(false); return E_FAIL; } + SAFE_ADDREF(m_pTrail); + SAFE_ADDREF(m_pEffectParts); m_pEffectParts->Load("../Bin/Resources/Data/Effect/Lumos/Lumos", static_cast(NEXT_LEVEL)); @@ -70,9 +72,10 @@ void CWand::Priority_Update(_float fTimeDelta) m_pTransformCom->Set_WorldMatrix(socketMatrix * XMLoadFloat4x4(m_pParentTransformCom->Get_WorldMatrixPtr())); +#ifdef _DEBUG Describe_Entity(); - +#endif // _DEBUG } void CWand::Update(_float fTimeDelta) diff --git a/Jusin154_Team3D/Client/Public/Goblin.h b/Jusin154_Team3D/Client/Public/Goblin.h index 355b1c540..0665ba634 100644 --- a/Jusin154_Team3D/Client/Public/Goblin.h +++ b/Jusin154_Team3D/Client/Public/Goblin.h @@ -37,8 +37,11 @@ class CGoblin final : public CMonster static CGoblin* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr) override; virtual void Free() override; +#ifdef _DEBUG virtual void Describe_Entity() override; +#endif // _DEBUG + private: virtual void Add_FSM(); virtual void Set_Anim(); diff --git a/Jusin154_Team3D/Client/Public/Monster.h b/Jusin154_Team3D/Client/Public/Monster.h index 3545423b4..dfca98381 100644 --- a/Jusin154_Team3D/Client/Public/Monster.h +++ b/Jusin154_Team3D/Client/Public/Monster.h @@ -31,7 +31,11 @@ class CMonster abstract : public CUnit public: virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr)PURE; virtual void Free() override; +#ifdef _DEBUG virtual void Describe_Entity() override; + +#endif // _DEBUG + }; NS_END diff --git a/Jusin154_Team3D/Engine/Private/GameInstance.cpp b/Jusin154_Team3D/Engine/Private/GameInstance.cpp index ea814f9ea..07f79843a 100644 --- a/Jusin154_Team3D/Engine/Private/GameInstance.cpp +++ b/Jusin154_Team3D/Engine/Private/GameInstance.cpp @@ -109,6 +109,9 @@ void CGameInstance::Update_Engine(_float fTimeDelta) m_pMouse_Manager->Update(); //m_pSound_Manager->Update(); +#ifdef _DEBUG + + #ifdef 기무리 static _bool bPicking = false; GUI::Checkbox("Picking Enable", &bPicking); @@ -116,6 +119,7 @@ void CGameInstance::Update_Engine(_float fTimeDelta) m_pPicking->Update(); } #endif // 기무리 +#endif // _DEBUG #ifndef 기무리 m_pPicking->Update(); #endif // !기무리 diff --git a/Jusin154_Team3D/Engine/Private/Instance_Model.cpp b/Jusin154_Team3D/Engine/Private/Instance_Model.cpp index 39f11b325..d4cf03a37 100644 --- a/Jusin154_Team3D/Engine/Private/Instance_Model.cpp +++ b/Jusin154_Team3D/Engine/Private/Instance_Model.cpp @@ -28,6 +28,7 @@ CInstance_Model::CInstance_Model(const CInstance_Model& rhs) SAFE_ADDREF(m_pVBInstance); } +#ifdef EDITOR_PROJECT HRESULT CInstance_Model::Initialize_Prototype(const _char* pModelFilePath, MODEL eType, _fmatrix& PreTransformMatrix, _uint iRootBoneIndex) { @@ -51,7 +52,6 @@ HRESULT CInstance_Model::Initialize_Prototype(const _char* pModelFilePath, MODEL { LoadData(pModelFilePath); } -#ifdef EDITOR_PROJECT else if (strcmp(".fbx", szEXT) == 0) { _char Temp[256]; @@ -66,7 +66,6 @@ HRESULT CInstance_Model::Initialize_Prototype(const _char* pModelFilePath, MODEL SaveAssimpModel(Temp , m_pAIScene); return S_OK; } -#endif #pragma region Mesh if (FAILED(Ready_Meshes())) { return E_FAIL; @@ -76,6 +75,47 @@ HRESULT CInstance_Model::Initialize_Prototype(const _char* pModelFilePath, MODEL return S_OK; } +#endif + +#ifndef EDITOR_PROJECT + +HRESULT CInstance_Model::Initialize_Prototype(const _char* pModelFilePath, MODEL eType, _fmatrix& PreTransformMatrix, _uint iRootBoneIndex) +{ + if (FAILED(__super::Initialize_Prototype())) + return E_FAIL; + + m_iNumBuffer = 2; + + XMStoreFloat4x4(&m_PreTransformMatrix, PreTransformMatrix); + + m_eType = eType; + _char szTextureFileName[MAX_PATH] = {}; + _char szDir[MAX_PATH] = {}; + _char szName[MAX_PATH] = {}; + _char szEXT[MAX_PATH] = {}; + + _splitpath_s(pModelFilePath, nullptr, 0, szDir, MAX_PATH, szName, MAX_PATH, szEXT, MAX_PATH); + + + if (strcmp(".bin", szEXT) == 0) + { + LoadData(pModelFilePath); + } + else { + return E_FAIL; + } +#pragma region Mesh + if (FAILED(Ready_Meshes())) { + return E_FAIL; + } + +#pragma endregion + + return S_OK; +} + +#endif + #ifdef EDITOR_PROJECT HRESULT CInstance_Model::Assimp_Model_Load(const _char* pModelFilePath, MODEL eType, _fmatrix& PreTransformMatrix, _uint iRootBoneIndex) { @@ -694,9 +734,7 @@ HRESULT CInstance_Model::Bind_CS_Output(_uint Index, _uint iBufferIndex) return S_OK; } - -#ifdef EDITOR_PROJECT - + CInstance_Model* CInstance_Model::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, const _char* pModelFilePath, MODEL eType, _fmatrix& PreTransformMatrix, _uint iRootBoneIndex) { CInstance_Model* pInstance = new CInstance_Model(pDevice, pContext); @@ -709,7 +747,6 @@ CInstance_Model* CInstance_Model::Create(ID3D11Device* pDevice, ID3D11DeviceCont return pInstance; } -#endif CComponent* CInstance_Model::Clone(void* pArg, CGameObject* pOwner) { diff --git a/Jusin154_Team3D/Engine/Private/Mouse_Manager.cpp b/Jusin154_Team3D/Engine/Private/Mouse_Manager.cpp index 1cff6dc5f..d48b710c4 100644 --- a/Jusin154_Team3D/Engine/Private/Mouse_Manager.cpp +++ b/Jusin154_Team3D/Engine/Private/Mouse_Manager.cpp @@ -59,7 +59,7 @@ void CMouse_Manager::Update() } m_ptOldMouseCur = m_ptCurrentMouseCur; - +#ifdef _DEBUG GUI::Begin("Mouse_Manager"); GUI::Text("AccumulateMomentum %f, %f", m_vMove.x, m_vMove.y); GUI::Text("CurPos %d, %d", m_ptCurrentMouseCur.x, m_ptCurrentMouseCur.y); @@ -79,7 +79,7 @@ void CMouse_Manager::Update() GUI::Text("INV_VPPOS: %f, %f", pt.x - (viewPort.Width * 0.5f), pt.y - (viewPort.Height * 0.5f)); GUI::End(); - +#endif Picking(); } else { diff --git a/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp b/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp index e95b268d4..f25a156d7 100644 --- a/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp +++ b/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp @@ -47,11 +47,12 @@ PSX::PxRigidDynamic* CPhysX_Manager::Add_DynamicActor(CRigidBody_Dynamic& RigidB } assert(nullptr != pShape); + // createExclusiveShape를 하면 쉐이프가 actor에 attach 된 상태로 나오기 때문에 + // 쉐이프 속성만 건드려서 액터의 쉐이프를 수정함 pShape->setFlags(RigidBody.Get_ShapeFlags()); pShape->setContactOffset(RigidBody.Get_ContactOffset()); pShape->setRestOffset(0.f); - pActorDynamic->attachShape(*pShape); PSX::PxRigidBodyFlags pxRigidFlags = RigidBody.Get_RigidBodyFlags(); pActorDynamic->setRigidBodyFlags(pxRigidFlags); @@ -101,7 +102,7 @@ PSX::PxRigidStatic* CPhysX_Manager::Add_StaticActor(CRigidBody_Static& RigidBody // GeoFlag 중 더블사이드는 이제 지원 안함, 할거면 노말 뒤집어서 하라고 함 // pPxMeshGeometry->meshFlags |= PSX::PxMeshGeometryFlag::eDOUBLE_SIDED; // 유효성 체크 - PX_ASSERT(pPxMeshGeometry.isValid()); + PX_ASSERT(pPxMeshGeometry->isValid()); m_TriangleMeshGeometry.emplace(RigidBody.Get_PxMeshKey(), pPxMeshGeometry); } break; @@ -331,10 +332,19 @@ unordered_set::iterator CPhysX_Manager::Detach_Actor(PSX::PxActor if (m_pActiveBodys.end() != iter) { m_pActiveBodys.erase(iter); // 액터를 활성화 맵에서 분리 해주고 iterOut = m_pRestBodies.insert(&Actor).first; // 액터를 다시 쓸 수 있기 때문에 따로 보관해줌 - if (m_pScene != nullptr) { - m_pScene->removeActor(Actor); - } } + + PSX::PxScene* pOwnerScene = Actor.getScene(); + + if (pOwnerScene == nullptr) { // 액터가 씬에 없는 경우 nullptr이 나옴 + return iterOut; + } + + if (pOwnerScene != m_pScene) { // 액터가 속한 씬이 아닌경우 빼면 안됨 + return iterOut; + } + m_pScene->removeActor(Actor); + return iterOut; } @@ -475,6 +485,19 @@ HRESULT CPhysX_Manager::Initialize() pPvdClient->setScenePvdFlag(PSX::PxPvdSceneFlag::eTRANSMIT_SCENEQUERIES, true); } + m_pMaterials.reserve(ENUM_CLASS(PXMATERIAL::END)); + m_pMaterials.push_back(m_pPhysics->createMaterial(0.5f, 0.5f, 0.6f)); + + PlaneData.eKind = PHYSX_KIND::BODY_STATIC; + PlaneData.iSubKind = UINT_MAX; + PlaneData.pOwner = nullptr; + PlaneData.pBody = nullptr; + + PSX::PxRigidStatic* pGroundPlane = PxCreatePlane(*m_pPhysics, physx::PxPlane(0, 1, 0, 0), *m_pMaterials[ENUM_CLASS(PXMATERIAL::DEFAULT)]); + pGroundPlane->userData = &PlaneData; + pGroundPlane->setName("PHYSX_MANAGER_PLANE"); + m_pScene->addActor(*pGroundPlane);; + // m_pScene->overlap();?????? #ifdef EDITOR_PROJECT #ifdef 기무리 @@ -483,8 +506,6 @@ HRESULT CPhysX_Manager::Initialize() PlaneData.pOwner = nullptr; PlaneData.pBody = nullptr; - m_pMaterials.reserve(ENUM_CLASS(PXMATERIAL::END)); - m_pMaterials.push_back(m_pPhysics->createMaterial(0.5f, 0.5f, 0.6f)); PSX::PxRigidStatic* pGroundPlane = PxCreatePlane(*m_pPhysics, physx::PxPlane(0, 1, 0, 0), *m_pMaterials[ENUM_CLASS(PXMATERIAL::DEFAULT)]); pGroundPlane->userData = &PlaneData; pGroundPlane->setName("PHYSX_MANAGER_PLANE"); @@ -515,8 +536,6 @@ HRESULT CPhysX_Manager::Initialize() PlaneData.pOwner = nullptr; PlaneData.pBody = nullptr; - m_pMaterials.reserve(ENUM_CLASS(PXMATERIAL::END)); - m_pMaterials.push_back(m_pPhysics->createMaterial(0.5f, 0.5f, 0.6f)); PSX::PxRigidStatic* pGroundPlane = PxCreatePlane(*m_pPhysics, physx::PxPlane(0, 1, 0, 0), *m_pMaterials[ENUM_CLASS(PXMATERIAL::DEFAULT)]); pGroundPlane->userData = &PlaneData; pGroundPlane->setName("PHYSX_MANAGER_PLANE"); @@ -547,8 +566,6 @@ HRESULT CPhysX_Manager::Initialize() PlaneData.pOwner = nullptr; PlaneData.pBody = nullptr; - m_pMaterials.reserve(ENUM_CLASS(PXMATERIAL::END)); - m_pMaterials.push_back(m_pPhysics->createMaterial(0.5f, 0.5f, 0.6f)); PSX::PxRigidStatic* pGroundPlane = PxCreatePlane(*m_pPhysics, physx::PxPlane(0, 1, 0, 0), *m_pMaterials[ENUM_CLASS(PXMATERIAL::DEFAULT)]); pGroundPlane->userData = &PlaneData; pGroundPlane->setName("PHYSX_MANAGER_PLANE"); From c96e0f49b40fe4abf2492d3f53c840b2778ed198 Mon Sep 17 00:00:00 2001 From: GiJungSUk Date: Wed, 26 Nov 2025 13:38:16 +0900 Subject: [PATCH 3/6] Update Instance_Model.cpp push --- Jusin154_Team3D/Engine/Private/Instance_Model.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Jusin154_Team3D/Engine/Private/Instance_Model.cpp b/Jusin154_Team3D/Engine/Private/Instance_Model.cpp index e8f041385..8a5c7b126 100644 --- a/Jusin154_Team3D/Engine/Private/Instance_Model.cpp +++ b/Jusin154_Team3D/Engine/Private/Instance_Model.cpp @@ -107,6 +107,7 @@ HRESULT CInstance_Model::Assimp_Model_Load(const _char* pModelFilePath, MODEL eT } #endif +#ifdef EDITOR_PROJECT HRESULT CInstance_Model::Ready_Meshes(MODEL eType, const aiScene* pAIScene, _fmatrix& PreTransformMatrix) { XMStoreFloat4x4(&m_PreTransformMatrix, PreTransformMatrix); From ff023d2cb43944917ad6a4c82ee52b10dc0ae21d Mon Sep 17 00:00:00 2001 From: kimnuri Date: Wed, 26 Nov 2025 13:41:47 +0900 Subject: [PATCH 4/6] [add] Plane patch --- Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp b/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp index f25a156d7..177a8856f 100644 --- a/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp +++ b/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp @@ -488,6 +488,7 @@ HRESULT CPhysX_Manager::Initialize() m_pMaterials.reserve(ENUM_CLASS(PXMATERIAL::END)); m_pMaterials.push_back(m_pPhysics->createMaterial(0.5f, 0.5f, 0.6f)); +#ifndef _DEBUG PlaneData.eKind = PHYSX_KIND::BODY_STATIC; PlaneData.iSubKind = UINT_MAX; PlaneData.pOwner = nullptr; @@ -497,6 +498,8 @@ HRESULT CPhysX_Manager::Initialize() pGroundPlane->userData = &PlaneData; pGroundPlane->setName("PHYSX_MANAGER_PLANE"); m_pScene->addActor(*pGroundPlane);; +#endif // _DEBUG + // m_pScene->overlap();?????? #ifdef EDITOR_PROJECT From b2aae02fdc17a39963a09d7b8c0bde8ae66375df Mon Sep 17 00:00:00 2001 From: hyunbin14 Date: Wed, 26 Nov 2025 14:05:26 +0900 Subject: [PATCH 5/6] =?UTF-8?q?[Add]=20=ED=94=8C=EB=A0=88=EC=9D=B4?= =?UTF-8?q?=EC=96=B4=20=EB=A7=88=EC=9A=B0=EC=8A=A4=20=EC=9D=B4=EB=8F=99=20?= =?UTF-8?q?[Fix]=20=EB=AA=A8=EB=8D=B8=20=ED=94=8C=EB=A0=88=EC=9D=B4=20?= =?UTF-8?q?=EC=95=A0=EB=8B=88=EB=A9=94=EC=9D=B4=EC=85=98=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Client/Private/CamPosition_Shoulder.cpp | 4 +- Jusin154_Team3D/Client/Private/Goblin.cpp | 2 +- .../Client/Private/Goblin_States.cpp | 6 +- Jusin154_Team3D/Client/Private/Player.cpp | 9 +- .../Client/Private/Player_States.cpp | 185 +++++++++++++++--- .../Resources/Models/Human/Npc/KeyFrame.bin | 2 +- .../Editor/Private/Level_ObjectViewer.cpp | 88 ++++++--- .../Editor/Public/Level_ObjectViewer.h | 3 + Jusin154_Team3D/Engine/Private/Animation.cpp | 8 +- Jusin154_Team3D/Engine/Private/Channel.cpp | 2 +- Jusin154_Team3D/Engine/Private/Model.cpp | 38 ++-- Jusin154_Team3D/Engine/Public/Animation.h | 3 + Jusin154_Team3D/Engine/Public/FSM.h | 1 + Jusin154_Team3D/Engine/Public/Model.h | 1 + 14 files changed, 263 insertions(+), 89 deletions(-) diff --git a/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp b/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp index 001602dad..410b62f2c 100644 --- a/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp +++ b/Jusin154_Team3D/Client/Private/CamPosition_Shoulder.cpp @@ -170,8 +170,8 @@ HRESULT CCamPosition_Shoulder::Ready_SubParts() CameraDesc.iPriority = 51; CameraDesc.pCameraKey = CAMERA_SHOULDER; CameraDesc.bEnableTransitionLerp = true; - CameraDesc.bEnableFollowLerp = true; - CameraDesc.bEnableLookLerp = true; + CameraDesc.bEnableFollowLerp = false; + CameraDesc.bEnableLookLerp = false; CameraDesc.vTransitionTime = { 0.f, 1.f }; CameraDesc.vFollowLerpTime = { 0.f, 0.16f }; CameraDesc.vLookLerpTime = { 0.f, 0.16f }; diff --git a/Jusin154_Team3D/Client/Private/Goblin.cpp b/Jusin154_Team3D/Client/Private/Goblin.cpp index a4f45ca5b..82d1ddf03 100644 --- a/Jusin154_Team3D/Client/Private/Goblin.cpp +++ b/Jusin154_Team3D/Client/Private/Goblin.cpp @@ -78,7 +78,7 @@ void CGoblin::Late_Update(_float fTimeDelta) m_pTransformCom->LookAt(m_pPlayerTransform->Get_State(STATE::POSITION)); - m_pGameInstance->Add_RenderGroup(RENDER::BLEND, this); + m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this); } HRESULT CGoblin::Render() diff --git a/Jusin154_Team3D/Client/Private/Goblin_States.cpp b/Jusin154_Team3D/Client/Private/Goblin_States.cpp index ff4a55c37..956e940c9 100644 --- a/Jusin154_Team3D/Client/Private/Goblin_States.cpp +++ b/Jusin154_Team3D/Client/Private/Goblin_States.cpp @@ -49,7 +49,7 @@ void CGoblin::Behavior_MoveEnter() HRESULT CGoblin::Behavior_MoveExitCheck() { - if (m_fTargetDistance <= 3.f) + if (m_fTargetDistance <= 7.f &&m_fTargetDistance !=0.f) m_pFSM->Change_State(FSMSTATE::COMBAT); return E_FAIL; @@ -66,9 +66,9 @@ void CGoblin::Behavior_CombatEnter() m_pFSM->Enable_State(FSMSTATE::COMBAT); - m_pFSM->Enable_State(FSMSTATE::SKILL); + m_pFSM->Enable_State(FSMSTATE::SKILL2); - pairAnimInfo = m_Animation[STATEANIM::SKILL]; + pairAnimInfo = m_Animation[STATEANIM::SKILL2]; m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); } diff --git a/Jusin154_Team3D/Client/Private/Player.cpp b/Jusin154_Team3D/Client/Private/Player.cpp index bb2d079af..b9d22ce31 100644 --- a/Jusin154_Team3D/Client/Private/Player.cpp +++ b/Jusin154_Team3D/Client/Private/Player.cpp @@ -165,8 +165,6 @@ HRESULT CPlayer::Render() void CPlayer::Render_CameraCoordinateSystem() { - - m_Batch->Begin(); const _float fArrowLength = 2.0f; @@ -188,7 +186,10 @@ void CPlayer::Render_CameraCoordinateSystem() GUI::Button("##6", {100.f, 100.f}); GUI::SameLine(); GUI::Button(("S : " + to_string(XMConvertToDegrees(CMyTools::Get_Direction2D(vLook, { -m_vCameraLookDir.x , -m_vCameraLookDir.z })))).c_str(), { 100.f, 100.f }); GUI::SameLine(); GUI::Button("##8", {100.f, 100.f}); - + //W CMyTools::Get_Direction2D(vLook, { m_vCameraLookDir.x , m_vCameraLookDir.z }) + //A CMyTools::Get_Direction2D(vLook, { -m_vCameraRightDir.x , - m_vCameraRightDir.z }) + //S CMyTools::Get_Direction2D(vLook, { m_vCameraRightDir.x , m_vCameraRightDir.z }) + //D CMyTools::Get_Direction2D(vLook, { -m_vCameraLookDir.x , - m_vCameraLookDir.z }) m_Batch->DrawLine( // W VertexPositionColor(fArrowLength * -XMLoadFloat3(&m_vCameraLookDir), DirectX::Colors::GhostWhite), VertexPositionColor(fArrowLength * XMLoadFloat3(&m_vCameraLookDir), DirectX::Colors::Blue) @@ -279,7 +280,7 @@ HRESULT CPlayer::Ready_Parts() { CCamPosition_Shoulder::CAMERA_SHOULDER_DESC Desc; Desc.pParentTransform = m_pTransformCom; - Desc.fMouseSensor = 0.5f; + Desc.fMouseSensor = 0.1f; Desc.fShoulderDistance = 2.f; Desc.fBackFrontRatio = 0.9f; Desc.fCameraFocalLength = 10.f; diff --git a/Jusin154_Team3D/Client/Private/Player_States.cpp b/Jusin154_Team3D/Client/Private/Player_States.cpp index 3c13ab1df..ef21dd031 100644 --- a/Jusin154_Team3D/Client/Private/Player_States.cpp +++ b/Jusin154_Team3D/Client/Private/Player_States.cpp @@ -101,19 +101,6 @@ void CPlayer::Behavior_IdleEnter() { m_pFSM->Enable_State(FSMSTATE::IDLE); pair<_uint, _bool> pairAnimInfo = m_Animation[STATEANIM::IDLE]; - if (m_pFSM->IsEnable_Previous(FSMSTATE::JOG | FSMSTATE::WALK | FSMSTATE::SPRINT)) { - - if (m_pFSM->IsEnable_Previous(FSMSTATE::WALK)) { - pairAnimInfo = m_Animation[STATEANIM::WALK_STOP]; - } - else if (m_pFSM->IsEnable_Previous(FSMSTATE::SPRINT)) { - pairAnimInfo = m_Animation[STATEANIM::JOG_STOP]; - } - - else if (m_pFSM->IsEnable_Previous(FSMSTATE::JOG)) { - pairAnimInfo = m_Animation[STATEANIM::JOG_STOP]; - } - } m_bSprintToggle = false; m_bWalkToggle = false; m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); @@ -151,10 +138,40 @@ HRESULT CPlayer::Behavior_IdleExitCheck() if (SUCCEEDED(InputMove())) { - m_pFSM->Change_State(FSMSTATE::MOVE); + if (m_pGameInstance->Key_Pressing(DIK_W)) + { + m_pFSM->Change_State(FSMSTATE::MOVE); + return E_FAIL; + } + /*if (m_pGameInstance->Key_Pressing(DIK_S)) + { + m_pFSM->Change_State(FSMSTATE::MOVE); + return E_FAIL; + }*/ + } + + if (m_pGameInstance->Key_Down(DIK_D)) + { + pairAnimInfo = m_Animation[STATEANIM::IDLE_TURN_R]; + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); return E_FAIL; } + if (m_pGameInstance->Key_Down(DIK_A)) + { + pairAnimInfo = m_Animation[STATEANIM::IDLE_TURN_L]; + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + return E_FAIL; + } + + if (m_pGameInstance->Key_Down(DIK_S)) + { + pairAnimInfo = m_Animation[STATEANIM::IDLE_TURN_BWD]; + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + return E_FAIL; + } + + if (m_pModelCom->IsFinishedAnim()) { pairAnimInfo = m_Animation[STATEANIM::IDLE]; @@ -208,7 +225,6 @@ void CPlayer::Behavior_MoveEnter() pairAnimInfo = m_Animation[STATEANIM::JOG_BWD]; m_fAmount = 0.2f; } - } } else { // While Moving @@ -246,6 +262,10 @@ void CPlayer::Behavior_MoveEnter() HRESULT CPlayer::Behavior_MoveExitCheck() { pair<_uint, _bool> pairAnimInfo; + _vector xmvLook = XMVector4Normalize(XMVectorSetY(m_pTransformCom->Get_State(STATE::LOOK), 0.f)); + _vector xmvRight = XMVector4Normalize(XMVectorSetY(m_pTransformCom->Get_State(STATE::RIGHT), 0.f)); + _uint iCurrentAnimIndex = m_pModelCom->Get_AnimIndex(); + if (SUCCEEDED(InputAction()) || SUCCEEDED(InputSpell())) { if (m_pGameInstance->Key_Down(DIK_SPACE)) { m_pFSM->Change_State(FSMSTATE::JUMP); @@ -304,16 +324,109 @@ HRESULT CPlayer::Behavior_MoveExitCheck() } return E_FAIL; } + if (SUCCEEDED(InputMove())) { - if (m_pModelCom->IsFinishedAnim() && m_pFSM->IsEnable(FSMSTATE::JOG)) - { - pairAnimInfo = m_Animation[STATEANIM::JOG_FWD]; - m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + _vector xmvPlayerDir = { }; + + { // 이동방향 누적 + if (m_pGameInstance->Key_Pressing(DIK_W)) { + xmvPlayerDir += xmvLook; + } + if (m_pGameInstance->Key_Pressing(DIK_A)) { + xmvPlayerDir -= xmvRight; + } + if (m_pGameInstance->Key_Pressing(DIK_S)) { + xmvPlayerDir -= xmvLook; + } + if (m_pGameInstance->Key_Pressing(DIK_D)) { + xmvPlayerDir += xmvRight; + } + } + + xmvPlayerDir = XMVectorSetW(XMVector3Normalize(xmvPlayerDir), 0.f); + + _float2 vPlayerDir = { XMVectorGetX(xmvPlayerDir), XMVectorGetZ(xmvPlayerDir) }; + _float2 vCameraLookDir = { m_vCameraLookDir.x, m_vCameraLookDir.z }; + + _float vDir = CMyTools::Get_Direction2D(vCameraLookDir, vPlayerDir); + _bool bSkipAngleCheck = { false }; + if (m_pFSM->IsEnable(FSMSTATE::JOG)) { + if (iCurrentAnimIndex != m_Animation[STATEANIM::JOG_FWD].first) { + bSkipAngleCheck = true; + if (m_pModelCom->IsFinishedAnim()|| + m_pFSM->IsEnable(FSMSTATE::STOP)) { + m_pFSM->Disable_State(FSMSTATE::STOP); + bSkipAngleCheck = false; + } + } + if (!bSkipAngleCheck) { + _bool bLeft = { true }; + if (vDir < 0.f) + { + // + left + } + else + { + // - Right + } + + _float absDir = fabsf(vDir); + if (absDir < XMConvertToRadians(160.f)) { + pairAnimInfo = m_Animation[STATEANIM::JOG_FWD]; + } + else if (absDir < XMConvertToRadians(90.f)) { + // pairAnimInfo = m_Animation[STATEANIM::] + } + else if (absDir < XMConvertToRadians(112.f)) { + // pairAnimInfo = m_Animation[STATEANIM::] + } + else if (absDir < XMConvertToRadians(135.f)) { + // pairAnimInfo = m_Animation[STATEANIM::] + } + else if (absDir < XMConvertToRadians(180.f)) { + pairAnimInfo = m_Animation[STATEANIM::JOG_BWD]; + + } + + { // left Right + + } + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + } } return S_OK; } - m_pFSM->Change_State(FSMSTATE::IDLE); + if (m_pFSM->IsEnable(FSMSTATE::JOG | FSMSTATE::WALK | FSMSTATE::SPRINT)|| + !SUCCEEDED(InputMove())) { + + if (!m_pFSM->IsEnable(FSMSTATE::STOP)) + { + m_pFSM->Enable_State(FSMSTATE::STOP); + if (m_pFSM->IsEnable(FSMSTATE::WALK)) { + pairAnimInfo = m_Animation[STATEANIM::WALK_STOP]; + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + } + else if (m_pFSM->IsEnable(FSMSTATE::SPRINT)) { + pairAnimInfo = m_Animation[STATEANIM::JOG_STOP]; + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + } + else if (m_pFSM->IsEnable(FSMSTATE::JOG)) { + pairAnimInfo = m_Animation[STATEANIM::JOG_STOP]; + m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); + } + } + else if (IsCurrentKeyFrame("Dodge")) + + { + m_pFSM->Change_State(FSMSTATE::IDLE); + m_pFSM->Disable_State(FSMSTATE::STOP); + } + + + + return S_OK; + } return E_FAIL; } @@ -590,9 +703,35 @@ void CPlayer::Add_FSM() Desc.funcExitCheck = [this](_float fTimedelta) { return Behavior_MoveExitCheck(); }; Desc.funcExitEvent = [this]() { Behavior_MoveExit(); }; Desc.funcPriorityUpdate = [this](_float fTimeDelta) { - if (m_pGameInstance->Key_Pressing(DIK_A)) { m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta); } - if (m_pGameInstance->Key_Pressing(DIK_D)) { m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta); }; - }; + _vector xmvRight = XMVector4Normalize(XMVectorSetY(m_pTransformCom->Get_State(STATE::RIGHT), 0.f)); + _vector xmvPlayerDir = { }; + + { + _float3 fMove = m_pGameInstance->Get_MouseMove(); + m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta * fMove.x* 0.1f); + m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta * fMove.y * 0.1f); + + if (m_pGameInstance->Key_Pressing(DIK_A)) { + xmvPlayerDir -= xmvRight; + } + if (m_pGameInstance->Key_Pressing(DIK_D)) { + xmvPlayerDir += xmvRight; + } + } + + xmvPlayerDir = XMVectorSetW(XMVector3Normalize(xmvPlayerDir), 0.f); + _float2 vPlayerDir = { XMVectorGetX(xmvPlayerDir), XMVectorGetZ(xmvPlayerDir) }; + _float2 vCameraLookDir = { m_vCameraLookDir.x, m_vCameraLookDir.z }; + + _float vDir = CMyTools::Get_Direction2D(vCameraLookDir, vPlayerDir); + _float absDir = fabsf(vDir); + if (m_pGameInstance->Key_Pressing(DIK_A)&& vDir < XMConvertToRadians(140.f) ) { + m_pTransformCom->Turn(-m_pTransformCom->Get_State(STATE::UP), fTimeDelta); } + if (m_pGameInstance->Key_Pressing(DIK_D)&& vDir > XMConvertToRadians(-140.f) ) { + m_pTransformCom->Turn(m_pTransformCom->Get_State(STATE::UP), fTimeDelta); }; + + }; + Desc.funcLateUpdate = nullptr; m_States.emplace(FSMSTATE::MOVE, CState_Move::Create(&Desc)); } diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/KeyFrame.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/KeyFrame.bin index 5ca18c2a5..db111f003 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/KeyFrame.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/KeyFrame.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8b12395ad9cb7848a23935a1241595b4a1a2ffbcde890ba0d2e04a3d7fda7478 +oid sha256:712744472b22eae067bd6cbc4da787016126d0b705448efff431cfd21e337281 size 43 diff --git a/Jusin154_Team3D/Editor/Private/Level_ObjectViewer.cpp b/Jusin154_Team3D/Editor/Private/Level_ObjectViewer.cpp index 4ec466813..4cf05529f 100644 --- a/Jusin154_Team3D/Editor/Private/Level_ObjectViewer.cpp +++ b/Jusin154_Team3D/Editor/Private/Level_ObjectViewer.cpp @@ -423,45 +423,42 @@ void CLevel_ObjectViewer::Dummy_Object_Setting() _float fKeyFrame = pModel->Get_CurrentTrackPosition(); m_KeyFrames.emplace(EventName, fKeyFrame); - _char szDir[MAX_PATH] = {}; - - _splitpath_s(m_DummyPath, nullptr, 0, szDir, MAX_PATH, nullptr, 0, nullptr, 0); - - _string szFile = "KeyFrame.bin"; - _string Path = szDir + szFile; - - FILE* fp = nullptr; - fopen_s(&fp, Path.c_str(), "wb"); - if (!fp) return; - - _uint KeyFrameSize = (_uint)m_KeyFrames.size(); - - fwrite(&KeyFrameSize, sizeof(_uint), 1, fp); - - for (auto& iter : m_KeyFrames) - { - _uint EventSize = (_uint)iter.first.size(); - fwrite(&iter.second, sizeof(_float), 1, fp); - fwrite(&EventSize, sizeof(_uint), 1, fp); - fwrite(iter.first.c_str(), sizeof(_char), EventSize, fp); - } - - - fclose(fp); + Save_KeyFrame(); EventName[0] = '\0'; } } + for (auto& iter : m_KeyFrames) { - ImDrawList* draw = ImGui::GetForegroundDrawList(); - ImVec2 center = ImGui::GetMainViewport()->GetCenter(); - float scale = 50.f; + string keyName = iter.first; - GUI::DragFloat(iter.first.c_str(), &iter.second); + _bool isSelected = (m_SelectedKey == keyName); + + if (ImGui::Selectable(keyName.c_str(), isSelected)) + { + m_SelectedKey = keyName; + } + + if (isSelected) + { + ImGui::Indent(); + + ImGui::DragFloat("KeyFrame", &iter.second, 0.01f); + + if (ImGui::Button("Delete KeyFrame")) + { + m_KeyFrames.erase(keyName); + m_SelectedKey.clear(); + break; + } + + ImGui::Unindent(); + } } + if (GUI::Button("Delete")) { m_pGameInstance->Get_Layer(NEXT_LEVEL, m_wszPreLayer)->Clear_Layer(); @@ -653,6 +650,35 @@ void CLevel_ObjectViewer::Find_Anim() } } +void CLevel_ObjectViewer::Save_KeyFrame() +{ + _char szDir[MAX_PATH] = {}; + + _splitpath_s(m_DummyPath, nullptr, 0, szDir, MAX_PATH, nullptr, 0, nullptr, 0); + + _string szFile = "KeyFrame.bin"; + _string Path = szDir + szFile; + + FILE* fp = nullptr; + fopen_s(&fp, Path.c_str(), "wb"); + if (!fp) return; + + _uint KeyFrameSize = (_uint)m_KeyFrames.size(); + + fwrite(&KeyFrameSize, sizeof(_uint), 1, fp); + + for (auto& iter : m_KeyFrames) + { + _uint EventSize = (_uint)iter.first.size(); + fwrite(&iter.second, sizeof(_float), 1, fp); + fwrite(&EventSize, sizeof(_uint), 1, fp); + fwrite(iter.first.c_str(), sizeof(_char), EventSize, fp); + } + + + fclose(fp); +} + HRESULT CLevel_ObjectViewer::Ready_Layer_Camera(const _wstring& strLayerTag) { @@ -708,8 +734,8 @@ HRESULT CLevel_ObjectViewer::Ready_Layer_Dummy(const _wstring& strLayerTag) - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag, m_Test))) - return E_FAIL; + //if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag, m_Test))) + // return E_FAIL; /*if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag))) return E_FAIL;*/ diff --git a/Jusin154_Team3D/Editor/Public/Level_ObjectViewer.h b/Jusin154_Team3D/Editor/Public/Level_ObjectViewer.h index 50a742a26..85e986890 100644 --- a/Jusin154_Team3D/Editor/Public/Level_ObjectViewer.h +++ b/Jusin154_Team3D/Editor/Public/Level_ObjectViewer.h @@ -40,6 +40,7 @@ class CLevel_ObjectViewer final : public CLevel _wchar* Save_ModelName(const _char* Category); void Load_KeyFrame(const _char* Name); void Find_Anim(); + void Save_KeyFrame(); private: vector m_Objects; @@ -55,6 +56,8 @@ class CLevel_ObjectViewer final : public CLevel _wchar m_wszPreLayer[MAX_PATH]; _char m_DummyPath[MAX_PATH]; _char m_FindAnimName[256] = {}; + string m_SelectedKey; + class CPlayer* m_Test = { nullptr }; public: static CLevel_ObjectViewer* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID); diff --git a/Jusin154_Team3D/Engine/Private/Animation.cpp b/Jusin154_Team3D/Engine/Private/Animation.cpp index 8e839eeac..9bffb0357 100644 --- a/Jusin154_Team3D/Engine/Private/Animation.cpp +++ b/Jusin154_Team3D/Engine/Private/Animation.cpp @@ -35,8 +35,8 @@ CAnimation::CAnimation(const CAnimation& rhs) } _bool CAnimation::Update_TransformationMatrices(const vector& Bones, const LOCALPOS_DESC* pLocalPosArray, _bool bIsLoop, _float fTimeDelta,CTransform*pTransform, _float m_fAmount) { - _float fProgress = m_fTickPerSecond * fTimeDelta * m_fAnimSpeed; - m_fCurrentTrackPosition += fProgress; + m_fProgress = m_fTickPerSecond * fTimeDelta * m_fAnimSpeed; + m_fCurrentTrackPosition += m_fProgress; if (m_fCurrentTrackPosition >= m_fDuration) { if (false == bIsLoop) { @@ -46,7 +46,7 @@ _bool CAnimation::Update_TransformationMatrices(const vector& Bone } else { Depart_Animation(); - m_fCurrentTrackPosition = fProgress; + m_fCurrentTrackPosition = m_fProgress; ResetRootMotion(); ProgressAnimation(Bones, pLocalPosArray, pTransform, m_fAmount); return true; @@ -195,6 +195,7 @@ void CAnimation::InterpAnim(CAnimation* pPreAnim, vector& Bones, _float if (boneName == "Reference") { finalT = XMVectorZero(); + } } @@ -207,7 +208,6 @@ void CAnimation::InterpAnim(CAnimation* pPreAnim, vector& Bones, _float } - void CAnimation::CreateGPUData(ID3D11Device* pDevice) { vector channels; diff --git a/Jusin154_Team3D/Engine/Private/Channel.cpp b/Jusin154_Team3D/Engine/Private/Channel.cpp index 72496230a..9c3c5fe5c 100644 --- a/Jusin154_Team3D/Engine/Private/Channel.cpp +++ b/Jusin154_Team3D/Engine/Private/Channel.cpp @@ -171,7 +171,7 @@ void CChannel::Update_TransformationMatirx( if (Bones[m_iBoneIndex]->Compare_Name("Reference") && pTransform != nullptr) { - GUI::Text("fCurrentTrackPosition : %f", fCurrentTrackPosition); + _float3 vCurRootPos; XMStoreFloat3(&vCurRootPos, vTranslation); diff --git a/Jusin154_Team3D/Engine/Private/Model.cpp b/Jusin154_Team3D/Engine/Private/Model.cpp index 10479dfcb..6fdf5c27a 100644 --- a/Jusin154_Team3D/Engine/Private/Model.cpp +++ b/Jusin154_Team3D/Engine/Private/Model.cpp @@ -105,27 +105,32 @@ HRESULT CModel::Bind_BoneMatrices(_uint iMeshIndex, CShader* pShader, const _cha return m_Meshes[iMeshIndex]->Bind_BoneMatrices(m_Bones, pShader, pConstantName); } -_bool CModel::Play_Animation(_float fTimeDelta,CTransform* pTransform) +_bool CModel::Play_Animation(_float fTimeDelta, CTransform* pTransform) { - if (!m_bPlayAnim){ + if (!m_bPlayAnim) + return false; + + if (m_iCurrentAnimIndex < 0 || m_iCurrentAnimIndex >= (_int)m_iNumAnimations) return false; - } - if (-1 == m_iCurrentAnimIndex // 정지 혹은 시작을 안시켜준 애님 - || m_iCurrentAnimIndex >= (_int)m_iNumAnimations) // 애님 인덱스 초과됨 - { - return false; // 잘못된 초기화 - } ComputeAnimation(); - if (m_iPreAnimIndex != m_iCurrentAnimIndex && m_iPreAnimIndex != 0) + if (m_iPreAnimIndex >= 0 && m_iPreAnimIndex != m_iCurrentAnimIndex) { m_fBlendTime += fTimeDelta; _float fRatio = (m_fBlendTime / m_fBlendDuration); - fRatio = min(fRatio, 1.f); + if (fRatio > 1.f) fRatio = 1.f; - m_bIsFinishedAnim = m_Animations[m_iCurrentAnimIndex]->Update_TransformationMatrices(m_Bones, m_pLocalPos, m_bIsLoop, fTimeDelta, pTransform, m_fAmount); - m_Animations[m_iCurrentAnimIndex]->InterpAnim(m_Animations[m_iPreAnimIndex], m_Bones, fRatio); + CAnimation* pCurAnim = m_Animations[m_iCurrentAnimIndex]; + CAnimation* pPreAnim = m_Animations[m_iPreAnimIndex]; + + _bool bPreFinished = pPreAnim->Update_TransformationMatrices(m_Bones, m_pLocalPos, m_bIsLoop, fTimeDelta, pTransform, m_fAmount * (1.f - fRatio)); + + _bool bCurFinished = pCurAnim->Update_TransformationMatrices(m_Bones, m_pLocalPos, m_bIsLoop, fTimeDelta, pTransform, m_fAmount * fRatio); + + pCurAnim->InterpAnim(pPreAnim, m_Bones, fRatio); + + m_bIsFinishedAnim = bCurFinished; if (fRatio >= 1.f) { @@ -136,6 +141,7 @@ _bool CModel::Play_Animation(_float fTimeDelta,CTransform* pTransform) else { m_bIsFinishedAnim = m_Animations[m_iCurrentAnimIndex]->Update_TransformationMatrices(m_Bones, m_pLocalPos, m_bIsLoop, fTimeDelta, pTransform, m_fAmount); + m_iPreAnimIndex = m_iCurrentAnimIndex; } @@ -144,12 +150,6 @@ _bool CModel::Play_Animation(_float fTimeDelta,CTransform* pTransform) pBone->Update_CombinedTransformationMatrix(m_Bones, XMLoadFloat4x4(&m_PreTransformMatrix)); } - if (m_bIsFinishedAnim) - { - m_Animations[m_iCurrentAnimIndex]->ResetRootMotion(); - m_Animations[m_iCurrentAnimIndex]->Depart_Animation(); - } - return m_bIsFinishedAnim; } @@ -163,8 +163,8 @@ void CModel::Set_AnimationIndex(_uint iIndex, _bool isLoop,_float fAmount) m_iCurrentAnimIndex = iIndex; m_bIsLoop = isLoop; m_fAmount = fAmount; - m_Animations[m_iCurrentAnimIndex]->ResetRootMotion(); m_Animations[m_iCurrentAnimIndex]->Depart_Animation(); + m_Animations[m_iCurrentAnimIndex]->ResetRootMotion(); } else { m_iCurrentAnimIndex = -1; diff --git a/Jusin154_Team3D/Engine/Public/Animation.h b/Jusin154_Team3D/Engine/Public/Animation.h index 43a2aeb8f..630c2b9d8 100644 --- a/Jusin154_Team3D/Engine/Public/Animation.h +++ b/Jusin154_Team3D/Engine/Public/Animation.h @@ -46,6 +46,8 @@ class ENGINE_DLL CAnimation : public CBase ID3D11Buffer* Get_ChannelBuffer() { return m_pChannelBuffer; } ID3D11ShaderResourceView* Get_KeyFrameSrv() { return m_pKeyFrameSrv; } ID3D11ShaderResourceView* Get_ChannelSrv() { return m_pChannelSrv; } + + _float Get_Progress() { return m_fProgress; } #ifdef EDITOR_PROJECT private: HRESULT Initialize(const vector& Bones, const aiAnimation* pAIAnimation); @@ -84,6 +86,7 @@ class ENGINE_DLL CAnimation : public CBase vector<_int> m_DestBones; // 이 애니메이션에서 영향을 받는 본들의 집합 vector m_StartKeyFrames; // 이 애니메이션의 영향을 받는 본들의 초기값 vector<_matrix> m_vBoneTransformationMatrix = {}; + _float m_fProgress = {}; _uint m_iChannelCount; _uint m_iKeyframeCount; diff --git a/Jusin154_Team3D/Engine/Public/FSM.h b/Jusin154_Team3D/Engine/Public/FSM.h index 61f7cc80f..259740ad4 100644 --- a/Jusin154_Team3D/Engine/Public/FSM.h +++ b/Jusin154_Team3D/Engine/Public/FSM.h @@ -18,6 +18,7 @@ enum ESTATE : _u64Flag SKILL = 1ULL << 11, SKILL2 = 1ULL << 12, MAPHELP = 1ULL << 13, + STOP = 1ULL << 14, END }; NS_END diff --git a/Jusin154_Team3D/Engine/Public/Model.h b/Jusin154_Team3D/Engine/Public/Model.h index a133be211..8a1eb3283 100644 --- a/Jusin154_Team3D/Engine/Public/Model.h +++ b/Jusin154_Team3D/Engine/Public/Model.h @@ -35,6 +35,7 @@ class ENGINE_DLL CModel final : public CComponent _bool Play_Animation(_float fTimeDelta, class CTransform* pTransform = nullptr); // 애니메이션에 델타타임을 넣어줌 void Set_AnimationIndex(_uint iIndex, _bool isLoop = true, _float fAmount = 1.f); _bool IsFinishedAnim() const { return m_bIsFinishedAnim; } + _bool IsLoopAnim() const { return m_bIsLoop; } void Set_CurrentTrackPosition(_float TrackPosition); const _char* Get_AnimList(_uint iIndex); _float Get_CurrentTrackPosition(); From 92a499483a9ddfcc2f93cc39dba687626c7c8ecc Mon Sep 17 00:00:00 2001 From: hyunbin14 Date: Wed, 26 Nov 2025 14:31:40 +0900 Subject: [PATCH 6/6] =?UTF-8?q?[Fix]=20=EC=9D=BC=EB=8B=A8=20=ED=8A=80?= =?UTF-8?q?=EB=8A=94=EC=83=81=ED=83=9C=20=EC=88=98=EC=A0=95=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jusin154_Team3D/Client/Private/Player_States.cpp | 13 ++++--------- Jusin154_Team3D/Engine/Private/Model.cpp | 4 ++-- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/Jusin154_Team3D/Client/Private/Player_States.cpp b/Jusin154_Team3D/Client/Private/Player_States.cpp index ef21dd031..f9d694570 100644 --- a/Jusin154_Team3D/Client/Private/Player_States.cpp +++ b/Jusin154_Team3D/Client/Private/Player_States.cpp @@ -106,11 +106,13 @@ void CPlayer::Behavior_IdleEnter() { m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second); } +// S_OK -> 현 상태 유지 +// E_FAIL -> 현 상태 탈출 HRESULT CPlayer::Behavior_IdleExitCheck() { pair<_uint, _bool> pairAnimInfo; - // S_OK -> 현 상태 유지 - // E_FAIL -> 현 상태 탈출 + _vector xmvLook = XMVector4Normalize(XMVectorSetY(m_pTransformCom->Get_State(STATE::LOOK), 0.f)); + _vector xmvRight = XMVector4Normalize(XMVectorSetY(m_pTransformCom->Get_State(STATE::RIGHT), 0.f)); if (SUCCEEDED(InputAction()) || SUCCEEDED(InputSpell())) { if (m_pGameInstance->Key_Down(DIK_SPACE)) { m_pFSM->Change_State(FSMSTATE::JUMP); @@ -143,11 +145,6 @@ HRESULT CPlayer::Behavior_IdleExitCheck() m_pFSM->Change_State(FSMSTATE::MOVE); return E_FAIL; } - /*if (m_pGameInstance->Key_Pressing(DIK_S)) - { - m_pFSM->Change_State(FSMSTATE::MOVE); - return E_FAIL; - }*/ } if (m_pGameInstance->Key_Down(DIK_D)) @@ -422,8 +419,6 @@ HRESULT CPlayer::Behavior_MoveExitCheck() m_pFSM->Change_State(FSMSTATE::IDLE); m_pFSM->Disable_State(FSMSTATE::STOP); } - - return S_OK; } diff --git a/Jusin154_Team3D/Engine/Private/Model.cpp b/Jusin154_Team3D/Engine/Private/Model.cpp index 6fdf5c27a..ccb805b33 100644 --- a/Jusin154_Team3D/Engine/Private/Model.cpp +++ b/Jusin154_Team3D/Engine/Private/Model.cpp @@ -124,9 +124,9 @@ _bool CModel::Play_Animation(_float fTimeDelta, CTransform* pTransform) CAnimation* pCurAnim = m_Animations[m_iCurrentAnimIndex]; CAnimation* pPreAnim = m_Animations[m_iPreAnimIndex]; - _bool bPreFinished = pPreAnim->Update_TransformationMatrices(m_Bones, m_pLocalPos, m_bIsLoop, fTimeDelta, pTransform, m_fAmount * (1.f - fRatio)); + //_bool bPreFinished = pPreAnim->Update_TransformationMatrices(m_Bones, m_pLocalPos, m_bIsLoop, fTimeDelta, pTransform, m_fAmount); - _bool bCurFinished = pCurAnim->Update_TransformationMatrices(m_Bones, m_pLocalPos, m_bIsLoop, fTimeDelta, pTransform, m_fAmount * fRatio); + _bool bCurFinished = pCurAnim->Update_TransformationMatrices(m_Bones, m_pLocalPos, m_bIsLoop, fTimeDelta, pTransform, m_fAmount); pCurAnim->InterpAnim(pPreAnim, m_Bones, fRatio);