[add] Cinematic
This commit is contained in:
@@ -424,7 +424,7 @@ HRESULT CCamPosition_Shoulder::Ready_SubParts()
|
||||
CameraDesc.bEnableTransitionLerp = true;
|
||||
CameraDesc.bEnableFollowLerp = false;
|
||||
CameraDesc.bEnableLookLerp = false;
|
||||
CameraDesc.vTransitionTime = { 0.f, 1.f };
|
||||
CameraDesc.vTransitionTime = { 0.f, 3.f };
|
||||
CameraDesc.vFollowLerpTime = { 0.f, TIMER_SHORT_LERP };
|
||||
CameraDesc.vLookLerpTime = { 0.f, TIMER_SHORT_LERP };
|
||||
|
||||
|
||||
@@ -108,6 +108,7 @@ CCamPosition_Target* CCamPosition_Target::Clone(void* pArg, class CGameObject* p
|
||||
void CCamPosition_Target::Free()
|
||||
{
|
||||
__super::Free();
|
||||
SAFE_RELEASE(m_pStalkingTarget);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
|
||||
@@ -189,9 +189,6 @@ HRESULT CCamera_Cinematic::Ready_SubPart()
|
||||
m_pFollowTargetPart->Get_Component<CTransform>()->Set_State(STATE::POSITION, XMVectorSet(-34.f, 5, -10.4f, 1.f));
|
||||
m_pLookTarget = m_pLookTargetPart = m_pGameInstance->Clone_Prototype< CCamPosition_Target>(g_iStaticLevel, &Desc);
|
||||
m_pLookTargetPart->Get_Component<CTransform>()->Set_State(STATE::POSITION, XMVectorSet(-34.f, 5, -11.4f, 1.f));
|
||||
|
||||
SAFE_ADDREF(m_pFollowTargetPart);
|
||||
SAFE_ADDREF(m_pLookTargetPart);
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
@@ -287,6 +284,31 @@ void CCamera_Cinematic::Clear_Lerp_FovY()
|
||||
m_vFovYLerp = { 60.f, 60.f };
|
||||
m_vLerpFovYTimer = { 0.f, 0.f };
|
||||
}
|
||||
void CCamera_Cinematic::Transition(_float fTimeDelta)
|
||||
{
|
||||
if (false == m_bIsCurrentTransition) {
|
||||
return;
|
||||
}
|
||||
m_vTransitionTime.x += fTimeDelta;
|
||||
_float fRatio = m_vTransitionTime.x / m_vTransitionTime.y;
|
||||
if (fRatio > 1.f) {
|
||||
fRatio = 1.f;
|
||||
m_bIsCurrentTransition = false;
|
||||
}
|
||||
|
||||
_vector vFollowTarget = m_pFollowTargetPart->Get_WorldPostion();
|
||||
_vector vLookTarget = m_pLookTargetPart->Get_WorldPostion();
|
||||
|
||||
_matrix xmMatTarget = XMMatrixInverse(nullptr, XMMatrixLookAtLH(vFollowTarget, vLookTarget, XMVectorSet(0.f, 1.f, 0.f, 0.f)));
|
||||
|
||||
_float4x4 matOrigin = *m_pTransformCom->Get_WorldMatrixPtr();
|
||||
_float4x4 matTarget = {}; XMStoreFloat4x4(&matTarget, xmMatTarget);
|
||||
_float4x4 matResult = {};
|
||||
|
||||
CMyTools::MatrixLerp(&matOrigin, &matTarget, matResult, fRatio);
|
||||
|
||||
m_pTransformCom->Set_WorldMatrix(matResult);
|
||||
}
|
||||
CCamera_Cinematic* CCamera_Cinematic::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CCamera_Cinematic* pInstance = new CCamera_Cinematic(pDevice, pContext);
|
||||
|
||||
@@ -243,9 +243,9 @@ HRESULT CLevel_Field::Ready_Camera()
|
||||
Camera_Desc.fFar = 500.f;
|
||||
Camera_Desc.pCameraKey = CAMERA_CINEMATIC;
|
||||
Camera_Desc.iPriority = 65;
|
||||
Camera_Desc.bEnableTransitionLerp = true;
|
||||
Camera_Desc.bEnableLookLerp = true;
|
||||
Camera_Desc.bEnableFollowLerp = true;
|
||||
Camera_Desc.bEnableTransitionLerp = false;
|
||||
Camera_Desc.bEnableLookLerp = false;
|
||||
Camera_Desc.bEnableFollowLerp = false;
|
||||
Camera_Desc.vTransitionTime.y = 1.f;
|
||||
Camera_Desc.pFollowTarget = { nullptr };
|
||||
Camera_Desc.pLookTarget = { nullptr };
|
||||
@@ -520,8 +520,8 @@ void CLevel_Field::Load_CutSceneXML(const string& path, CCamera* pCamera, CMonst
|
||||
SOCKETCONTENTS SocketContents = {};
|
||||
|
||||
SocketContents .fRatio = 0.f;
|
||||
_int fStartPosition = 0;
|
||||
pSocketNode->QueryIntAttribute("fStartPosition", &fStartPosition);
|
||||
_float fStartPosition = 0;
|
||||
pSocketNode->QueryFloatAttribute("fStartPosition", &fStartPosition);
|
||||
SocketContents.fRatio = CMyTools::Saturate(fStartPosition / pTimeLine->m_vTimer.y);
|
||||
// Info
|
||||
tinyxml2::XMLElement* pInfoNode = pSocketNode->FirstChildElement("Info");
|
||||
|
||||
@@ -53,6 +53,7 @@ class CCamera_Cinematic final : public CCamera
|
||||
void Start_Lerp_FovY(_float fTimeMaximum, _float2 vRange);
|
||||
void Clear_Lerp_FovY();
|
||||
|
||||
virtual void Transition(_float fTimeDelta) override;
|
||||
private:
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
CCamPosition_Target* m_pLookTargetPart = { nullptr };
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<RanrokIntro fDuration = "10">
|
||||
<RanrokIntro fDuration = "15">
|
||||
<Socket fStartPosition = "0">
|
||||
<Info strEventName = "On_Camera" eTypeParam = "TARGET" pTarget = "CAMERA_CINEMATIC" eTypeFunc="BIND_CAMERA"/>
|
||||
<Param_0>
|
||||
@@ -38,8 +38,8 @@
|
||||
<Param_0>
|
||||
<OtherTarget Layer = "" TypeID = ""/>
|
||||
<Transform>
|
||||
<RotQ X="-0.078" Y="0.221" Z="0.018" W="0.972"/>
|
||||
<Trans X="10.088" Y="7.579" Z="26.052"/>
|
||||
<RotQ X="-0.096" Y="0.216" Z="0.021" W="0.972"/>
|
||||
<Trans X="11.494" Y="7.807" Z="27.081"/>
|
||||
</Transform>
|
||||
</Param_0>
|
||||
<vFlags>
|
||||
@@ -72,8 +72,8 @@
|
||||
<Param_0>
|
||||
<OtherTarget Layer = "" TypeID = ""/>
|
||||
<Transform>
|
||||
<RotQ X="-0.078" Y="0.221" Z="0.018" W="0.972"/>
|
||||
<Trans X="10.088" Y="7.579" Z="26.052"/>
|
||||
<RotQ X="-0.096" Y="0.216" Z="0.021" W="0.972"/>
|
||||
<Trans X="11.494" Y="7.807" Z="27.081"/>
|
||||
</Transform>
|
||||
</Param_0>
|
||||
<vFlags>
|
||||
@@ -166,10 +166,10 @@
|
||||
<uint X="" Y="" Z="" W=""/>
|
||||
</Param_10>
|
||||
<Param_11>
|
||||
<float X="60" Y="20" Z="0.5" W=""/>
|
||||
<float X="60" Y="4" Z="1" W=""/>
|
||||
</Param_11>
|
||||
</Socket>
|
||||
<Socket fStartPosition = "1.5" >
|
||||
<Socket fStartPosition = "2" >
|
||||
<Info strEventName = "ZOOM_OUT_LERP" eTypeParam = "NOT_USE" pTarget = "CAMERA_CINEMATIC" eTypeFunc="ZOOM_LERP"/>
|
||||
<Param_0>
|
||||
<OtherTarget Layer = "" TypeID = ""/>
|
||||
@@ -200,16 +200,16 @@
|
||||
<uint X="" Y="" Z="" W=""/>
|
||||
</Param_10>
|
||||
<Param_11>
|
||||
<float X="20" Y="40" Z="2" W=""/>
|
||||
<float X="4" Y="40" Z="2" W=""/>
|
||||
</Param_11>
|
||||
</Socket>
|
||||
<Socket fStartPosition = "1.5" >
|
||||
<Info strEventName = "ZOOM_OUT_TRANS_LERP" eTypeParam = "TRANSFORM" pTarget = "CAMERA_CINEMATIC" eTypeFunc="TRANSLATION"/>
|
||||
<Socket fStartPosition = "2" >
|
||||
<Info strEventName = "ZOOM_OUT_TRANS_LERP" eTypeParam = "TRANSFORM" pTarget = "CAMERA_CINEMATIC" eTypeFunc="TRANSLATION_LERP"/>
|
||||
<Param_0>
|
||||
<OtherTarget Layer = "" TypeID = ""/>
|
||||
<Transform>
|
||||
<RotQ X="-0.100" Y="0.205" Z="0.021" W="0.973"/>
|
||||
<Trans X="65.920" Y="32.915" Z="149.397"/>
|
||||
<RotQ X="-0.128" Y="0.392" Z="0.055" W="0.909"/>
|
||||
<Trans X="59.834" Y="33.752" Z="149.152"/>
|
||||
</Transform>
|
||||
</Param_0>
|
||||
<vFlags>
|
||||
@@ -237,7 +237,41 @@
|
||||
<float X="2" Y="0" Z="0" W=""/>
|
||||
</Param_11>
|
||||
</Socket>
|
||||
<Socket fStartPosition = "3.5" >
|
||||
<Socket fStartPosition = "2" >
|
||||
<Info strEventName = "ZOOM_OUT_ROT_LERP" eTypeParam = "TRANSFORM" pTarget = "CAMERA_CINEMATIC" eTypeFunc="ROTATION_LERP"/>
|
||||
<Param_0>
|
||||
<OtherTarget Layer = "" TypeID = ""/>
|
||||
<Transform>
|
||||
<RotQ X="-0.128" Y="0.392" Z="0.055" W="0.909"/>
|
||||
<Trans X="59.834" Y="33.752" Z="149.152"/>
|
||||
</Transform>
|
||||
</Param_0>
|
||||
<vFlags>
|
||||
<Flag id ="0">false</Flag>
|
||||
<Flag id ="1">false</Flag>
|
||||
<Flag id ="2">false</Flag>
|
||||
<Flag id ="3">false</Flag>
|
||||
<Flag id ="4">false</Flag>
|
||||
<Flag id ="5">false</Flag>
|
||||
<Flag id ="6">false</Flag>
|
||||
<Flag id ="7">false</Flag>
|
||||
<Flag id ="8">false</Flag>
|
||||
<Flag id ="9">false</Flag>
|
||||
<Flag id ="10">false</Flag>
|
||||
<Flag id ="11">false</Flag>
|
||||
<Flag id ="12">false</Flag>
|
||||
<Flag id ="13">false</Flag>
|
||||
<Flag id ="14">false</Flag>
|
||||
<Flag id ="15">false</Flag>
|
||||
</vFlags>
|
||||
<Param_10>
|
||||
<uint X="" Y="" Z="" W=""/>
|
||||
</Param_10>
|
||||
<Param_11>
|
||||
<float X="2" Y="0" Z="0" W=""/>
|
||||
</Param_11>
|
||||
</Socket>
|
||||
<Socket fStartPosition = "6" >
|
||||
<Info strEventName = "Ranrok_TUCK_0" eTypeParam = "NOT_USE" pTarget = "ACTOR_RANROK" eTypeFunc="SET_FSMSTATE"/>
|
||||
<Param_0>
|
||||
<OtherTarget Layer = "" TypeID = ""/>
|
||||
|
||||
@@ -91,7 +91,7 @@ class ENGINE_DLL CCamera abstract : public CGameObject
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
HRESULT Bind_Matrices();
|
||||
void Transition(_float fTimeDelta);
|
||||
virtual void Transition(_float fTimeDelta);
|
||||
|
||||
public:
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner)PURE;
|
||||
|
||||
Reference in New Issue
Block a user