diff --git a/Jusin154_Team3D/Client/Default/Client.cpp b/Jusin154_Team3D/Client/Default/Client.cpp
index 149f8d4c1..905d6a176 100644
--- a/Jusin154_Team3D/Client/Default/Client.cpp
+++ b/Jusin154_Team3D/Client/Default/Client.cpp
@@ -25,7 +25,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
{
#ifdef _DEBUG
_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
- //_CrtSetBreakAlloc(1181);
+ _CrtSetBreakAlloc(45489776);
//_CrtSetBreakAlloc(1182);
//_CrtSetBreakAlloc(1183);
//_CrtSetBreakAlloc(1184);
diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj b/Jusin154_Team3D/Client/Default/Client.vcxproj
index e1de4a5ba..a9d8abb8e 100644
--- a/Jusin154_Team3D/Client/Default/Client.vcxproj
+++ b/Jusin154_Team3D/Client/Default/Client.vcxproj
@@ -127,7 +127,7 @@
cd /d "$(SolutionDir)"
-call Update_Shaders.bat
+call Update_Resources.bat
@@ -154,7 +154,7 @@ call Update_Shaders.bat
cd /d "$(SolutionDir)"
-call Update_Shaders.bat
+call Update_Resources.bat
diff --git a/Jusin154_Team3D/Client/Private/NomalJap.cpp b/Jusin154_Team3D/Client/Private/NomalJap.cpp
index 73ae777d4..7d9d54370 100644
--- a/Jusin154_Team3D/Client/Private/NomalJap.cpp
+++ b/Jusin154_Team3D/Client/Private/NomalJap.cpp
@@ -232,8 +232,10 @@ void CNomalJap::OnCollision(CGameObject* pOther, void* pDesc)
Get_PartObject()->Set_Visible(false);
Get_PartObject()->Get_Component()->Set_State(STATE::POSITION, XMVectorSet(0.f, 0.f, 0.f, 1.f));
- m_pPhysHitBox->Set_Dead();
- SAFE_RELEASE(m_pPhysHitBox);
+ if (nullptr != m_pPhysHitBox) {
+ m_pPhysHitBox->Set_Dead();
+ SAFE_RELEASE(m_pPhysHitBox);
+ }
}
void CNomalJap::Free()
diff --git a/Jusin154_Team3D/Client/Private/Player.cpp b/Jusin154_Team3D/Client/Private/Player.cpp
index 5919a3235..760b01efc 100644
--- a/Jusin154_Team3D/Client/Private/Player.cpp
+++ b/Jusin154_Team3D/Client/Private/Player.cpp
@@ -253,7 +253,7 @@ HRESULT CPlayer::Ready_Components()
Desc.iSubKind = ENUM_CLASS(COLLIDABLEOBJECT::PLAYER);
Desc.pTransform = m_pTransformCom;
Desc.eBodyType = ACTOR::CAPSULE;
- Desc.fContactOffset = 0.1f;
+ Desc.fContactOffset = 0.17f;
Desc.fMaterial = { 0.5f, 0.5f, 0.6f };
Desc.bAutoStepping = { false };
Desc.fStepOffset = { 0.05f };
diff --git a/Jusin154_Team3D/Engine/Private/Character_Controller.cpp b/Jusin154_Team3D/Engine/Private/Character_Controller.cpp
index 800c43a40..1fff47315 100644
--- a/Jusin154_Team3D/Engine/Private/Character_Controller.cpp
+++ b/Jusin154_Team3D/Engine/Private/Character_Controller.cpp
@@ -159,7 +159,7 @@ void CCharacter_Controller::Move(_float fTimeDelta)
const PSX::PxObstacleContext* pPxObstacles = { nullptr }; // 캐릭터가 충돌해야할 추가적인 장애물 객체?, 닿은 장애물은 캐시된다?
if (true == m_bGravity) {
- m_pTransform->AccumulateMomentum(XMVectorSet(0.f, -3.5f * fTimeDelta, 0.f, 0.f));
+ m_pTransform->AccumulateMomentum(XMVectorSet(0.f, -GRAVITY * m_fGravity * fTimeDelta, 0.f, 0.f));
}
XMStoreFloat3((_float3*)&pxVecMomentum, m_pTransform->Get_CurrentMomentum());
@@ -372,7 +372,8 @@ void CCharacter_Controller::Describe_Entity()
GUIHelpMarker("A capsule is affected by its lower sphere and tends to generate an up vector on steps.\nIn eEASY, the up vector is combined with the step offset, allowing easier climbing; in eCONSTRAINED, the up vector is removed during step detection and only the step offset is used.");
}
}
- GUI::Text("%.1f", cosf(m_fSlopeLimit)); GUI::SameLine(); GUI::SliderFloat("m_fSlopeLimit", &m_fSlopeLimit, 0.0f, 1.f);
+ GUI::Text("%.1f", XMConvertToDegrees(acosf(m_fSlopeLimit))); GUI::SameLine(); GUI::SliderFloat("m_fSlopeLimit", &m_fSlopeLimit, 0.0f, 1.f);
+ GUI::SliderFloat("m_fGravity_Multiplier", &m_fGravity, 0.0f, 3.f);
if (GUI::SliderFloat3("Volume", (_float*)&vVolume, 0.1f, 10.f, "%.2f")) {
Modify_Volume(vVolume);
}GUIHelpMarker("Box uses vSize; Capsule uses x->fRadius, y->fHeight.\nThe capsule's fHeight is likely the distance from the lower sphere center to the upper sphere center.");
diff --git a/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp b/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp
index da35fb0ae..811af0234 100644
--- a/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp
+++ b/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp
@@ -534,16 +534,20 @@ HRESULT CPhysX_Manager::Initialize()
m_pMaterials.push_back(m_pPhysics->createMaterial(0.5f, 0.5f, 0.6f));
// m_pScene->overlap();??????
+#ifdef EDITOR_PROJECT
- PlaneData.eKind = PHYSX_KIND::BODY_STATIC;
- PlaneData.iSubKind = UINT_MAX;
- PlaneData.pOwner = nullptr;
- PlaneData.pBody = nullptr;
+ if (true == m_bDebugCreatePlane) {
+ 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);;
+ 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);
+ }
+#endif
return S_OK;
}
@@ -582,7 +586,7 @@ CPhysX_Manager* CPhysX_Manager::Create(ID3D11Device* pDevice, ID3D11DeviceContex
void CPhysX_Manager::Free()
{
ClearScene();
-
+
for (auto& pMeshes : m_TriangleMeshes) {
pMeshes.second->release();
} m_TriangleMeshes.clear();
@@ -591,6 +595,14 @@ void CPhysX_Manager::Free()
Safe_Delete(pGeometry.second);
} m_TriangleMeshGeometry.clear();
+ for (auto& pGeometry : m_HeightFieldGeometry) {
+ Safe_Delete(pGeometry.second);
+ } m_HeightFieldGeometry.clear();
+
+ for (auto& pField : m_HeightFields) {
+ pField.second->release();
+ } m_HeightFields.clear();
+
if (nullptr != m_pCookingParam) {
Safe_Delete(m_pCookingParam);
}
diff --git a/Jusin154_Team3D/Engine/Public/Character_Controller.h b/Jusin154_Team3D/Engine/Public/Character_Controller.h
index beae886b9..44f4fe536 100644
--- a/Jusin154_Team3D/Engine/Public/Character_Controller.h
+++ b/Jusin154_Team3D/Engine/Public/Character_Controller.h
@@ -69,9 +69,10 @@ class ENGINE_DLL CCharacter_Controller final :
private:
ACTOR m_eBodyType = { ACTOR::END };
PSX::PxController* m_pController = { nullptr };
- CTransform* m_pTransform = { nullptr };
+ CTransform* m_pTransform = { nullptr };
_bool m_bAutoStepping = { false };
- _float m_fSlopeLimit = { 0.5f/*0~1*/}; // cosf각도, 오르막 경사각 제한. ( 추가설정 필요함 )
+ _float m_fGravity = { 0.129f };
+ _float m_fSlopeLimit = { 0.69f/*0~1*/}; // cosf각도, 오르막 경사각 제한. ( 추가설정 필요함 )
PhsXUserData m_tagData = {};
PSX::PxControllerCollisionFlags m_eBeforeCollisionFlags = {};
diff --git a/Jusin154_Team3D/Engine/Public/PhysX_Manager.h b/Jusin154_Team3D/Engine/Public/PhysX_Manager.h
index c6023f59a..9f6e97662 100644
--- a/Jusin154_Team3D/Engine/Public/PhysX_Manager.h
+++ b/Jusin154_Team3D/Engine/Public/PhysX_Manager.h
@@ -89,7 +89,13 @@ class CPhysX_Manager final : public CBase
map<_wstring, PSX::PxHeightField*> m_HeightFields = {};
map<_wstring, PSX::PxHeightFieldGeometry*> m_HeightFieldGeometry = {};
+
+#ifdef EDITOR_PROJECT
+ _bool m_bDebugCreatePlane = { true };
PhsXUserData PlaneData = {};
+#else
+ _bool m_bDebugCreatePlane = { false };
+#endif // EDITOR_PROJECT
vector m_pMaterials = { };
_uint m_iNumLevel = {};