diff --git a/Jusin154_Team3D/Client/Private/Camera_Debug.cpp b/Jusin154_Team3D/Client/Private/Camera_Debug.cpp index 17ab6c973..e5404bec9 100644 --- a/Jusin154_Team3D/Client/Private/Camera_Debug.cpp +++ b/Jusin154_Team3D/Client/Private/Camera_Debug.cpp @@ -205,6 +205,10 @@ void CCamera_Debug::Describe_Entity() } if (GUI::CollapsingHeader("DebugCamera")){ m_pTransformCom->Describe_Entity(); + _float fFovYDegree = XMConvertToDegrees(m_fFovy); + if (GUI::SliderFloat("FOV", &fFovYDegree, 0.01f, 89.f, "%.2f")) { + m_fFovy = XMConvertToRadians(fFovYDegree); + } } GUI::End(); } diff --git a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp index 05c932845..5c0e6c8a6 100644 --- a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp +++ b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp @@ -163,7 +163,23 @@ HRESULT CLevel_GamePlay::Initialize() void CLevel_GamePlay::Update(_float fTimeDelta) { + _bool bStartCinematic = { true }; +#ifdef _DEBUG +#ifdef 기무리 + bStartCinematic = true; +#elif 진우 + bStartCinematic = true; +#else +#endif +#endif // _DEBUG + + if (bStartCinematic && false == m_bIntroCinematic) { + m_bIntroCinematic = true; + bStartCinematic = false; + _string strCutSceneName = "CarriageIntro"; + m_pInfoInstance->Active_Event(strCutSceneName); + } if (m_pGameInstance->Key_Pressing(DIK_0)) { if (m_pGameInstance->Key_Up(DIK_1)) { @@ -339,9 +355,9 @@ HRESULT CLevel_GamePlay::Ready_Background() isReady_Hogwart = false; #endif // #ifdef 기무리 - isReady_Background = false; - isReady_Hogsmeade = false; - isReady_Hogwart = false; + isReady_Background = true; + isReady_Hogsmeade = true; + isReady_Hogwart = true; #endif // #ifdef 나 isReady_Background = false; @@ -915,7 +931,7 @@ HRESULT CLevel_GamePlay::Ready_Layer_Camera() Camera_Desc.fNear = 0.3f; Camera_Desc.fFar = 500.f; Camera_Desc.pCameraKey = CAMERA_CINEMATIC; - Camera_Desc.iPriority = 52; + Camera_Desc.iPriority = 54; Camera_Desc.bEnableTransitionLerp = false; Camera_Desc.bEnableLookLerp = false; Camera_Desc.bEnableFollowLerp = false; diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp index 18075c7c3..c4a1c3b40 100644 --- a/Jusin154_Team3D/Client/Private/Loader.cpp +++ b/Jusin154_Team3D/Client/Private/Loader.cpp @@ -480,10 +480,10 @@ HRESULT CLoader::Loading_For_GamePlay() #endif // #ifdef 기무리 isLoad_Background = true; - isLoad_Hogwart = false; + isLoad_Hogwart = true; isLoad_UI_SEQUANTIAL = false; isLoad_NPC = false; - isLoad_Monster = true; + isLoad_Monster = false; #endif // #ifdef 나 isLoad_Background = false; diff --git a/Jusin154_Team3D/Client/Private/Player_States.cpp b/Jusin154_Team3D/Client/Private/Player_States.cpp index 1ff81e8ed..97349d05f 100644 --- a/Jusin154_Team3D/Client/Private/Player_States.cpp +++ b/Jusin154_Team3D/Client/Private/Player_States.cpp @@ -394,7 +394,8 @@ HRESULT CPlayer::Behavior_CutSceneExitCheck(_float fTimeDelta) { m_pTransformCom->Set_State(STATE::POSITION, m_pCarriage->Get_SocketWorldMatrix(CThestralCarriage::CARRIAGE_SOCKET::FRONT_RIGHT).r[3]); m_pCharacter_Controller->Set_Position(m_pTransformCom->Get_State(STATE::POSITION)); - m_pTransformCom->RotationQ(XMQuaternionRotationAxis(XMVectorSet(0.f, -1.f, 0.f, 0.f), XMConvertToRadians(90.f))); + m_pTransformCom->RotationQ(XMQuaternionIdentity()); + //m_pTransformCom->RotationQ(XMQuaternionRotationAxis(XMVectorSet(0.f, -1.f, 0.f, 0.f), XMConvertToRadians(90.f))); } return S_OK; diff --git a/Jusin154_Team3D/Client/Private/ThestralCarriage.cpp b/Jusin154_Team3D/Client/Private/ThestralCarriage.cpp index 7a595e639..c0f442291 100644 --- a/Jusin154_Team3D/Client/Private/ThestralCarriage.cpp +++ b/Jusin154_Team3D/Client/Private/ThestralCarriage.cpp @@ -57,8 +57,6 @@ HRESULT CThestralCarriage::Initialize(void* pArg) //for (auto& anim : chain) // m_pModelCom->Set_ChainAnimation(anim); - m_iAnimationIndex = 0; - m_pModelCom->Set_AnimationIndex(m_iAnimationIndex); m_pModelCom->IsRootBone(false); // //m_pModelCom->Start_ChainAnimation(); @@ -69,6 +67,7 @@ HRESULT CThestralCarriage::Initialize(void* pArg) void CThestralCarriage::Priority_Update(_float fTimeDelta) { __super::Priority_Update(fTimeDelta); + Lerp_Transform(fTimeDelta); } void CThestralCarriage::Update(_float fTimeDelta) @@ -192,9 +191,9 @@ void CThestralCarriage::Trigger(CTimeSocket& Socket) { m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3((_float3*)&pContents->pxTransform.p), 1.f)); } break; - case TIMESOCKET_FUNC::TRANSLATION_LERP: + case TIMESOCKET_FUNC::AFFINE_LERP: { - + Lerp_Start(pContents->pxTransform, pContents->vParam_11.x); } break; case TIMESOCKET_FUNC::SET_ANIMSTATE: { @@ -269,6 +268,42 @@ _matrix CThestralCarriage::Get_SocketWorldMatrix(CARRIAGE_SOCKET eSocket) } } +void CThestralCarriage::Lerp_Stop() +{ + m_LerpStartMatrix = { }; + m_LerpEndMatrix = { }; + m_vLerpTimer = { }; + m_bLerp = { false }; +} + +void CThestralCarriage::Lerp_Start(PSX::PxTransform pxTransform, _float fLerpTimer) +{ + XMStoreFloat4x4(&m_LerpStartMatrix, m_pTransformCom->Get_XMWorldMatrix()); + _float3 vScale = m_pTransformCom->Get_Scale(); + XMStoreFloat4x4(&m_LerpEndMatrix, XMMatrixAffineTransformation(XMLoadFloat3(&vScale), XMVectorZero(), + XMLoadFloat4((_float4*)&pxTransform.q), XMVectorSetW(XMLoadFloat3((_float3*)&pxTransform.p), 1.f))); + m_vLerpTimer.x = 0; + m_vLerpTimer.y = fLerpTimer; + m_bLerp = true; +} + +void CThestralCarriage::Lerp_Transform(_float fTimeDelta) +{ + if (true == m_bLerp) { + m_vLerpTimer.x += fTimeDelta; + _float4x4 vLerpResult = {}; + if (m_vLerpTimer.x >= m_vLerpTimer.y) { + m_bLerp = false; + m_vLerpTimer.x = 0.f; + CMyTools::MatrixLerp(XMLoadFloat4x4(&m_LerpStartMatrix), XMLoadFloat4x4(&m_LerpEndMatrix), vLerpResult, 1.f); + } + else { + CMyTools::MatrixLerp(XMLoadFloat4x4(&m_LerpStartMatrix), XMLoadFloat4x4(&m_LerpEndMatrix), vLerpResult, m_vLerpTimer.x/m_vLerpTimer.y); + } + m_pTransformCom->Set_WorldMatrix(vLerpResult); + } +} + HRESULT CThestralCarriage::Ready_Components() { CTransform::TRANSFORM_DESC Desc = {}; @@ -375,7 +410,7 @@ void CThestralCarriage::Describe_Entity() GUI::Text("AnimTrack %.2f", m_pModelCom->Get_CurrentTrackPosition()); GUI::Text("AnimRatio %.2f", m_pModelCom->Get_CurrentTrackProgressRatio()); _float3 Pos; - XMStoreFloat3(&Pos, Get_WorldPostion()); + XMStoreFloat3(&Pos, m_pTransformCom->Get_State(STATE::POSITION)); float Pos3[3] = { Pos.x, Pos.y, Pos.z }; GUI::DragFloat3("Pos", Pos3); @@ -384,7 +419,7 @@ void CThestralCarriage::Describe_Entity() _float RotR, RotU, RotL; RotR = XMVectorGetX(m_pTransformCom->Get_State(STATE::RIGHT)); - RotU = XMVectorGetY(m_pTransformCom->Get_State(STATE::UP)); + RotU = XMVectorGetY(m_pTransformCom->Get_State(STATE::UP)); RotL = XMVectorGetZ(m_pTransformCom->Get_State(STATE::LOOK)); float Rot3[3] = { RotR, RotU,RotL }; diff --git a/Jusin154_Team3D/Client/Public/Level_GamePlay.h b/Jusin154_Team3D/Client/Public/Level_GamePlay.h index d0148d6a7..7c98f5a17 100644 --- a/Jusin154_Team3D/Client/Public/Level_GamePlay.h +++ b/Jusin154_Team3D/Client/Public/Level_GamePlay.h @@ -24,6 +24,7 @@ class CLevel_GamePlay final : public CLevel _bool m_bLevel = { false }; _bool m_bCurrentLevel = { false }; + _bool m_bIntroCinematic = { false }; private: virtual HRESULT Initialize() override; diff --git a/Jusin154_Team3D/Client/Public/ThestralCarriage.h b/Jusin154_Team3D/Client/Public/ThestralCarriage.h index 3af332df3..c33215415 100644 --- a/Jusin154_Team3D/Client/Public/ThestralCarriage.h +++ b/Jusin154_Team3D/Client/Public/ThestralCarriage.h @@ -43,9 +43,17 @@ class CThestralCarriage final : public CUnit virtual _vector Get_WorldPostion()override; _matrix Get_SeatMatrix(); _matrix Get_SocketWorldMatrix(CARRIAGE_SOCKET eSocket); + void Lerp_Stop(); + void Lerp_Start(PSX::PxTransform pxTransform, _float fLerpTimer); + void Lerp_Transform(_float fTimeDelta); private: CInfoInstance* m_pInfoInstance = { nullptr }; + _float4x4 m_LerpStartMatrix = { }; + _float4x4 m_LerpEndMatrix = { }; + _float2 m_vLerpTimer = { }; + _bool m_bLerp = { false }; + _uint m_iAnimationIndex = 0; #ifdef _DEBUG _bool m_bRender_WireFrame = { false }; diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/CutScene/CarriageIntro.xml b/Jusin154_Team3D/Editor/Bin/Resources/Data/CutScene/CarriageIntro.xml index b04416f77..d7ad6dd53 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/CutScene/CarriageIntro.xml +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/CutScene/CarriageIntro.xml @@ -1,4 +1,4 @@ - + @@ -73,6 +73,43 @@ + + + + + + + + + + + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + + + + + + + + @@ -115,8 +152,8 @@ - - + + @@ -222,11 +259,11 @@ - + - + @@ -329,7 +366,7 @@ - + @@ -337,8 +374,8 @@ - - + + @@ -374,8 +411,8 @@ - - + + @@ -406,8 +443,230 @@ - - + + + + + + + + + + + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + + + + + + + + + + + + + + + + + + + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + + + + + + + + + + + + + + + + + + + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + + + + + + + + + + + + + + + + + + + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + + + + + + + + + + + + + + + + + + + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + + + + + + + + + + + + + + + + + + + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + + + + + + + + + + @@ -437,162 +696,17 @@ - - - - - - - - - - - - - - - - - false - false - false - false - false - false - false - false - false - false - false - false - false - false - false - false - - - - - - - - - - - - - - - - - - - - - - false - false - false - false - false - false - false - false - false - false - false - false - false - false - false - false - - - - - - - - - - - - - - - - - - - - - - false - false - false - false - false - false - false - false - false - false - false - false - false - false - false - false - - - - - - - - - - - - - - - - - - - - - - false - false - false - false - false - false - false - false - false - false - false - false - false - false - false - false - - - - - - + + + --> + - + @@ -628,7 +742,309 @@ - + + + + + + + + + + + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + + + + + + + + + + + + + + + + + + + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + + + + + + + + + + + + + + + + + + + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + + + + + + + + + + + + + + + + + + + + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + + + + + + + + + + + + + + + + + + + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + + + + + + + + + + + + + + + + + + + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + + + + + + + + + + + + + + + + + + + + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + + + + + + + + + + + + + + + + + + + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + + + + + + + + + + + + + @@ -665,7 +1081,44 @@ - + + + + + + + + + + + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + + + + + + + + + @@ -702,7 +1155,7 @@ - + @@ -739,5 +1192,44 @@ + + + + + + + + + + + + + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + + + + + + + + diff --git a/Jusin154_Team3D/Engine/Public/Engine_Macro.h b/Jusin154_Team3D/Engine/Public/Engine_Macro.h index d9a55d3cf..6d084ea41 100644 --- a/Jusin154_Team3D/Engine/Public/Engine_Macro.h +++ b/Jusin154_Team3D/Engine/Public/Engine_Macro.h @@ -35,7 +35,7 @@ #undef ASSERT_NURI #define ASSERT_NURI(expression) assert(expression) #define MSG_BOX(_message) MessageBox(NULL, TEXT(_message), L"System Message", MB_OK); assert(false); -//#undef USE_LOWTEXTURE // 매크로 옵션으로 해상도 조절, 주석 걸면 디버그모드에서 저해상도 유지 +#undef USE_LOWTEXTURE // 매크로 옵션으로 해상도 조절, 주석 걸면 디버그모드에서 저해상도 유지 //#undef OPTIONAL_TRUE_KEYINPUTGUICHECK //#define OPTIONAL_TRUE_KEYINPUTGUICHECK true|| #elif 진우 diff --git a/Jusin154_Team3D/Engine/Public/MyTools.h b/Jusin154_Team3D/Engine/Public/MyTools.h index 18173e55c..2ce27593f 100644 --- a/Jusin154_Team3D/Engine/Public/MyTools.h +++ b/Jusin154_Team3D/Engine/Public/MyTools.h @@ -136,18 +136,18 @@ class CMyTools { _Out_ _float4x4& matOut, _float fRatio) { _matrix matOrigin = XMLoadFloat4x4(pMatOrigin); _matrix matTarget = XMLoadFloat4x4(pMatTarget); - MatrixLerp(&matOrigin, &matTarget, matOut, fRatio); + MatrixLerp(matOrigin, matTarget, matOut, fRatio); } - inline static void MatrixLerp( _In_ _matrix* pMatOrigin, // Origin -> 0 - _In_ _matrix* pMatTarget, // Target -> 1 + inline static void MatrixLerp( _In_ _fmatrix pMatOrigin, // Origin -> 0 + _In_ _cmatrix pMatTarget, // Target -> 1 _Out_ _float4x4& matOut, _float fRatio) { fRatio = Saturate(fRatio); _vector vTargetScale{}, vTargetRotq{}, vTargetTrans{}; _vector vOriginScale{}, vOriginRotq{}, vOriginTrans{}; - XMMatrixDecompose(&vTargetScale, &vTargetRotq, &vTargetTrans, *pMatTarget); - XMMatrixDecompose(&vOriginScale, &vOriginRotq, &vOriginTrans, *pMatOrigin); + XMMatrixDecompose(&vTargetScale, &vTargetRotq, &vTargetTrans, pMatTarget); + XMMatrixDecompose(&vOriginScale, &vOriginRotq, &vOriginTrans, pMatOrigin); vTargetScale = XMVectorLerp(vOriginScale, vTargetScale, fRatio); vTargetRotq = XMQuaternionSlerp(vOriginRotq, vTargetRotq, fRatio); diff --git a/Jusin154_Team3D/Engine/Public/TimeSocket.h b/Jusin154_Team3D/Engine/Public/TimeSocket.h index 2b3da839d..20487836f 100644 --- a/Jusin154_Team3D/Engine/Public/TimeSocket.h +++ b/Jusin154_Team3D/Engine/Public/TimeSocket.h @@ -27,6 +27,7 @@ typedef enum class typeTimeSocket_Func { TRANSLATION_LERP, ROTATION, ROTATION_LERP, + AFFINE_LERP, TOGGLE_FLAGS, // CAMERA @@ -74,6 +75,7 @@ static constexpr pair g_SocketFuncTypeTable[ENUM_C {"TRANSLATION_LERP", TIMESOCKET_FUNC::TRANSLATION_LERP}, {"ROTATION", TIMESOCKET_FUNC::ROTATION}, {"ROTATION_LERP", TIMESOCKET_FUNC::ROTATION_LERP}, + {"AFFINE_LERP", TIMESOCKET_FUNC::AFFINE_LERP}, {"TOGGLE_FLAGS", TIMESOCKET_FUNC::TOGGLE_FLAGS}, // CAMERA