From 1fdac66706af05fd3878b856aed1ab54f11c8322 Mon Sep 17 00:00:00 2001 From: Chanbin Kim <127280695+JinhoBa@users.noreply.github.com> Date: Wed, 14 Jan 2026 22:52:59 +0900 Subject: [PATCH] =?UTF-8?q?[fix]=20=EB=82=98=EB=AD=87=EC=9E=8E=20RigidBody?= =?UTF-8?q?=20=EC=83=9D=EC=84=B1=ED=95=98=EC=A7=80=20=EC=95=8A=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Client/Private/InstancedProp.cpp | 6 +++++- .../Client/Private/Level_GamePlay.cpp | 18 ++++++++++++++++++ Jusin154_Team3D/Client/Public/InstancedProp.h | 2 ++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/Jusin154_Team3D/Client/Private/InstancedProp.cpp b/Jusin154_Team3D/Client/Private/InstancedProp.cpp index f180069b0..b67ca2ff5 100644 --- a/Jusin154_Team3D/Client/Private/InstancedProp.cpp +++ b/Jusin154_Team3D/Client/Private/InstancedProp.cpp @@ -102,6 +102,9 @@ HRESULT CInstancedProp::Ready_Components(void* pArg) INSTANCE_PROP_DESC* pDesc = static_cast(pArg); + m_isShake = pDesc->isShake; + m_isTree = pDesc->isTree; + /* Com_VIBuffer_Instance_Model */ if (FAILED(__super::Add_Asset_Component(NEXT_LEVEL, pDesc->strPrototypeTag, reinterpret_cast(&m_pVIBufferInstanceCom)))) @@ -119,7 +122,6 @@ HRESULT CInstancedProp::Ready_Components(void* pArg) if(FAILED(Load_InstancedProp(pDesc->strInstanceDataPath.c_str(), pDesc))) return E_FAIL; - m_isShake = pDesc->isShake; if (m_isShake) m_pVIBufferInstanceCom->Set_Shake_Value(pDesc->vRadius, pDesc->vSpeed); @@ -204,6 +206,8 @@ HRESULT CInstancedProp::Load_InstancedProp(const _char* pFilePath, INSTANCE_PROP { for (_uint i = 0; i < m_iNumMesh; ++i) { + if (true == m_isTree && 0 == i) + continue; CRigidBody_Static* pRigidBody = { nullptr }; CRigidBody_Static::RIGIDBODY_STATIC_DESC Desc = {}; Desc.pMeshName = RigidBodyTags[i].c_str(); diff --git a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp index b4df62bab..26ee4ee7a 100644 --- a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp +++ b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp @@ -611,6 +611,7 @@ HRESULT CLevel_GamePlay::Ready_IntstanceProp(map<_string, CLand*>* Lands) /* InstanceProp Oak_Tree*/ Desc.isShake = true; + Desc.isTree = true; Desc.eShaderPass = SHADER_PASS_WORLDMODLE_INSTANCE::DEFAULT; Desc.bEnableRigidbody = true; Desc.vRadius = _float2(0.015f, 0.02f); @@ -629,6 +630,7 @@ HRESULT CLevel_GamePlay::Ready_IntstanceProp(map<_string, CLand*>* Lands) /* BearBerry */ Desc.isShake = true; + Desc.isTree = false; Desc.bEnableRigidbody = false; Desc.vRadius = _float2(0.015f, 0.02f); Desc.vSpeed = _float2(0.6f, 1.f); @@ -640,6 +642,7 @@ HRESULT CLevel_GamePlay::Ready_IntstanceProp(map<_string, CLand*>* Lands) /* SM_HM_OwlPost_Window_A */ Desc.isShake = false; + Desc.isTree = false; Desc.bEnableRigidbody = false; Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_HM_OwlPost_Window_A"; Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/OwlPost_Window.bin"; @@ -648,6 +651,7 @@ HRESULT CLevel_GamePlay::Ready_IntstanceProp(map<_string, CLand*>* Lands) ///* WA_Rectangle_Double_A */ Desc.isShake = false; + Desc.isTree = false; Desc.bEnableRigidbody = false; Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WA_Rectangle_Double_A"; Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Rectangle_Double_A.bin"; @@ -656,6 +660,7 @@ HRESULT CLevel_GamePlay::Ready_IntstanceProp(map<_string, CLand*>* Lands) ///* WC_Retangle_Double_A */ Desc.isShake = false; + Desc.isTree = false; Desc.bEnableRigidbody = false; Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WC_Retangle_Double_A"; Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WC_Retangle_Double_A.bin"; @@ -664,6 +669,7 @@ HRESULT CLevel_GamePlay::Ready_IntstanceProp(map<_string, CLand*>* Lands) ///* WA_Square_Double_C */ Desc.isShake = false; + Desc.isTree = false; Desc.bEnableRigidbody = false; Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WA_Square_Double_C"; Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WA_Square_Double_C.bin"; @@ -672,6 +678,7 @@ HRESULT CLevel_GamePlay::Ready_IntstanceProp(map<_string, CLand*>* Lands) /* Quid_Window_A */ Desc.isShake = false; + Desc.isTree = false; Desc.bEnableRigidbody = false; Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_Quid_Window_A"; Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Quid_Window_A.bin"; @@ -680,6 +687,7 @@ HRESULT CLevel_GamePlay::Ready_IntstanceProp(map<_string, CLand*>* Lands) /* Ollivanders_Box_Window */ Desc.isShake = false; + Desc.isTree = false; Desc.bEnableRigidbody = false; Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_Ollivanders_Box_Window"; Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Ollivanders_Box.bin"; @@ -688,6 +696,7 @@ HRESULT CLevel_GamePlay::Ready_IntstanceProp(map<_string, CLand*>* Lands) /* WC_L_DoubleS_A */ Desc.isShake = false; + Desc.isTree = false; Desc.bEnableRigidbody = false; Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WC_L_DoubleS_A"; Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WC_L_DoubleS_A.bin"; @@ -696,6 +705,7 @@ HRESULT CLevel_GamePlay::Ready_IntstanceProp(map<_string, CLand*>* Lands) /* WC_Round_Double_A */ Desc.isShake = false; + Desc.isTree = false; Desc.bEnableRigidbody = false; Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_WC_Round_Double_A"; Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/WC_Round_Double_A.bin"; @@ -704,6 +714,7 @@ HRESULT CLevel_GamePlay::Ready_IntstanceProp(map<_string, CLand*>* Lands) /* SM_HM_Door1a */ Desc.isShake = false; + Desc.isTree = false; Desc.bEnableRigidbody = true; Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door1a"; Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Door1a.bin"; @@ -712,6 +723,7 @@ HRESULT CLevel_GamePlay::Ready_IntstanceProp(map<_string, CLand*>* Lands) /* SM_HM_Door2b */ Desc.isShake = false; + Desc.isTree = false; Desc.bEnableRigidbody = true; Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_HM_Door2b"; Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Door2b.bin"; @@ -728,6 +740,7 @@ HRESULT CLevel_GamePlay::Ready_IntstanceProp(map<_string, CLand*>* Lands) /* OakTree_TallA */ Desc.isShake = false; + Desc.isTree = true; Desc.bEnableRigidbody = true; Desc.vRadius = _float2(0.015f, 0.016f); Desc.vSpeed = _float2(0.01f, 0.1f); @@ -738,6 +751,7 @@ HRESULT CLevel_GamePlay::Ready_IntstanceProp(map<_string, CLand*>* Lands) /* Shrub_B */ Desc.isShake = true; + Desc.isTree = false; Desc.bEnableRigidbody = false; Desc.vRadius = _float2(0.015f, 0.04f); Desc.vSpeed = _float2(0.3f, 1.f); @@ -748,6 +762,7 @@ HRESULT CLevel_GamePlay::Ready_IntstanceProp(map<_string, CLand*>* Lands) /* BogMyrtle_A */ Desc.isShake = true; + Desc.isTree = false; Desc.bEnableRigidbody = false; Desc.vRadius = _float2(0.015f, 0.04f); Desc.vSpeed = _float2(0.3f, 1.f); @@ -762,6 +777,7 @@ HRESULT CLevel_GamePlay::Ready_IntstanceProp(map<_string, CLand*>* Lands) /* Dogwood_B */ Desc.isShake = true; + Desc.isTree = true; Desc.bEnableRigidbody = true; Desc.vRadius = _float2(0.015f, 0.02f); Desc.vSpeed = _float2(0.3f, 1.f); @@ -772,6 +788,7 @@ HRESULT CLevel_GamePlay::Ready_IntstanceProp(map<_string, CLand*>* Lands) /* ScotsPine_LargeA */ Desc.isShake = false; + Desc.isTree = true; Desc.bEnableRigidbody = true; Desc.vRadius = _float2(0.015f, 0.02f); Desc.vSpeed = _float2(0.3f, 1.f); @@ -795,6 +812,7 @@ HRESULT CLevel_GamePlay::Ready_IntstanceProp(map<_string, CLand*>* Lands) /* StratifiedCliff_A1 */ Desc.isShake = false; + Desc.isTree = false; Desc.bEnableRigidbody = false; Desc.vRadius = _float2(0.f, 0.f); Desc.vSpeed = _float2(0.f, 0.f); diff --git a/Jusin154_Team3D/Client/Public/InstancedProp.h b/Jusin154_Team3D/Client/Public/InstancedProp.h index 460ed6b0e..f6d1a6d28 100644 --- a/Jusin154_Team3D/Client/Public/InstancedProp.h +++ b/Jusin154_Team3D/Client/Public/InstancedProp.h @@ -19,6 +19,7 @@ class CInstancedProp final : public CGameObject SHADER_PASS_WORLDMODLE_INSTANCE eShaderPass; _bool isShake; _bool bEnableRigidbody; + _bool isTree; _float2 vRadius; _float2 vSpeed; _wstring strPrototypeTag; @@ -38,6 +39,7 @@ class CInstancedProp final : public CGameObject private: _bool m_isShake = {}; + _bool m_isTree = {}; _uint m_iNumMesh = {}; _uint m_iNumInstacne = {}; SHADER_PASS_WORLDMODLE_INSTANCE m_eShaderPass = {};