[add] 숄더뷰 카메라 추가
This commit is contained in:
@@ -168,7 +168,9 @@
|
|||||||
<ClInclude Include="..\Public\Camera_Gaze.h" />
|
<ClInclude Include="..\Public\Camera_Gaze.h" />
|
||||||
<ClInclude Include="..\Public\CamPosition.h" />
|
<ClInclude Include="..\Public\CamPosition.h" />
|
||||||
<ClInclude Include="..\Public\CamPosition_Arm.h" />
|
<ClInclude Include="..\Public\CamPosition_Arm.h" />
|
||||||
<ClInclude Include="..\Public\CamPosition_Player.h" />
|
<ClInclude Include="..\Public\CamPosition_Shoulder.h" />
|
||||||
|
<ClInclude Include="..\Public\CamPosition_Socket.h" />
|
||||||
|
<ClInclude Include="..\Public\CamPosition_Target.h" />
|
||||||
<ClInclude Include="..\Public\Client_Define.h" />
|
<ClInclude Include="..\Public\Client_Define.h" />
|
||||||
<ClInclude Include="..\Public\Client_Enum.h" />
|
<ClInclude Include="..\Public\Client_Enum.h" />
|
||||||
<ClInclude Include="..\Public\Client_Macro.h" />
|
<ClInclude Include="..\Public\Client_Macro.h" />
|
||||||
@@ -213,7 +215,9 @@
|
|||||||
<ClCompile Include="..\Private\Camera_Gaze.cpp" />
|
<ClCompile Include="..\Private\Camera_Gaze.cpp" />
|
||||||
<ClCompile Include="..\Private\CamPosition.cpp" />
|
<ClCompile Include="..\Private\CamPosition.cpp" />
|
||||||
<ClCompile Include="..\Private\CamPosition_Arm.cpp" />
|
<ClCompile Include="..\Private\CamPosition_Arm.cpp" />
|
||||||
<ClCompile Include="..\Private\CamPosition_Player.cpp" />
|
<ClCompile Include="..\Private\CamPosition_Shoulder.cpp" />
|
||||||
|
<ClCompile Include="..\Private\CamPosition_Socket.cpp" />
|
||||||
|
<ClCompile Include="..\Private\CamPosition_Target.cpp" />
|
||||||
<ClCompile Include="..\Private\Dummy_PhysXPlayable.cpp" />
|
<ClCompile Include="..\Private\Dummy_PhysXPlayable.cpp" />
|
||||||
<ClCompile Include="..\Private\Dummy_PhysXWall.cpp" />
|
<ClCompile Include="..\Private\Dummy_PhysXWall.cpp" />
|
||||||
<ClCompile Include="..\Private\SkyBox.cpp" />
|
<ClCompile Include="..\Private\SkyBox.cpp" />
|
||||||
|
|||||||
@@ -67,9 +67,6 @@
|
|||||||
<ClInclude Include="..\Public\Wand.h">
|
<ClInclude Include="..\Public\Wand.h">
|
||||||
<Filter>02.GameObjects\Item\Wand</Filter>
|
<Filter>02.GameObjects\Item\Wand</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\Public\CamPosition_Player.h">
|
|
||||||
<Filter>02.GameObjects\Cameras\CameraPosition\Player</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\Public\CamPosition_Arm.h">
|
<ClInclude Include="..\Public\CamPosition_Arm.h">
|
||||||
<Filter>02.GameObjects\Cameras\CameraPosition\Arm</Filter>
|
<Filter>02.GameObjects\Cameras\CameraPosition\Arm</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
@@ -130,6 +127,15 @@
|
|||||||
<ClInclude Include="..\Public\State_Move.h">
|
<ClInclude Include="..\Public\State_Move.h">
|
||||||
<Filter>04.Mechanic\State\Movement\Move</Filter>
|
<Filter>04.Mechanic\State\Movement\Move</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\Public\CamPosition_Socket.h">
|
||||||
|
<Filter>02.GameObjects\Cameras\CameraPosition\Socket</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\Public\CamPosition_Target.h">
|
||||||
|
<Filter>02.GameObjects\Cameras\CameraPosition\Player\Target</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\Public\CamPosition_Shoulder.h">
|
||||||
|
<Filter>02.GameObjects\Cameras\CameraPosition\Player\Shoulder</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Image Include="Client.ico">
|
<Image Include="Client.ico">
|
||||||
@@ -212,9 +218,6 @@
|
|||||||
<Filter Include="02.GameObjects\Cameras\Debug">
|
<Filter Include="02.GameObjects\Cameras\Debug">
|
||||||
<UniqueIdentifier>{8d89a59c-fbd2-4a4a-ab01-a70abb80cc49}</UniqueIdentifier>
|
<UniqueIdentifier>{8d89a59c-fbd2-4a4a-ab01-a70abb80cc49}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter Include="02.GameObjects\Cameras\Shoulder">
|
|
||||||
<UniqueIdentifier>{708bbc88-47fb-42c5-b060-14cec7d646f2}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="02.GameObjects\Environment\Lights\Main">
|
<Filter Include="02.GameObjects\Environment\Lights\Main">
|
||||||
<UniqueIdentifier>{b24c78ef-dccc-41f0-a086-053ae6b7fbf4}</UniqueIdentifier>
|
<UniqueIdentifier>{b24c78ef-dccc-41f0-a086-053ae6b7fbf4}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
@@ -326,6 +329,15 @@
|
|||||||
<Filter Include="04.Mechanic\State\Movement\Move">
|
<Filter Include="04.Mechanic\State\Movement\Move">
|
||||||
<UniqueIdentifier>{0a3f9629-27d1-411c-806e-b550af8f1ca1}</UniqueIdentifier>
|
<UniqueIdentifier>{0a3f9629-27d1-411c-806e-b550af8f1ca1}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
|
<Filter Include="02.GameObjects\Cameras\CameraPosition\Player\Target">
|
||||||
|
<UniqueIdentifier>{1f9c16e8-b675-419f-b166-b79662407259}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="02.GameObjects\Cameras\CameraPosition\Player\Shoulder">
|
||||||
|
<UniqueIdentifier>{708bbc88-47fb-42c5-b060-14cec7d646f2}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="02.GameObjects\Cameras\CameraPosition\Socket">
|
||||||
|
<UniqueIdentifier>{2e4f0394-e25c-4508-937a-7e73d005ae5f}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="Client.cpp">
|
<ClCompile Include="Client.cpp">
|
||||||
@@ -379,9 +391,6 @@
|
|||||||
<ClCompile Include="..\Private\Wand.cpp">
|
<ClCompile Include="..\Private\Wand.cpp">
|
||||||
<Filter>02.GameObjects\Item\Wand</Filter>
|
<Filter>02.GameObjects\Item\Wand</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\Private\CamPosition_Player.cpp">
|
|
||||||
<Filter>02.GameObjects\Cameras\CameraPosition\Player</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\Private\CamPosition_Arm.cpp">
|
<ClCompile Include="..\Private\CamPosition_Arm.cpp">
|
||||||
<Filter>02.GameObjects\Cameras\CameraPosition\Arm</Filter>
|
<Filter>02.GameObjects\Cameras\CameraPosition\Arm</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@@ -442,6 +451,15 @@
|
|||||||
<ClCompile Include="..\Private\State_Move.cpp">
|
<ClCompile Include="..\Private\State_Move.cpp">
|
||||||
<Filter>04.Mechanic\State\Movement\Move</Filter>
|
<Filter>04.Mechanic\State\Movement\Move</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\Private\CamPosition_Socket.cpp">
|
||||||
|
<Filter>02.GameObjects\Cameras\CameraPosition\Socket</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\Private\CamPosition_Target.cpp">
|
||||||
|
<Filter>02.GameObjects\Cameras\CameraPosition\Player\Target</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\Private\CamPosition_Shoulder.cpp">
|
||||||
|
<Filter>02.GameObjects\Cameras\CameraPosition\Player\Shoulder</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="Client.rc">
|
<ResourceCompile Include="Client.rc">
|
||||||
|
|||||||
@@ -6,12 +6,10 @@ CCamPosition_Arm::CCamPosition_Arm(ID3D11Device* pDevice, ID3D11DeviceContext* p
|
|||||||
: CCamPosition(pDevice, pContext)
|
: CCamPosition(pDevice, pContext)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
CCamPosition_Arm::CCamPosition_Arm(const CCamPosition_Arm& rhs)
|
CCamPosition_Arm::CCamPosition_Arm(const CCamPosition_Arm& rhs)
|
||||||
: CCamPosition(rhs)
|
: CCamPosition(rhs)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT CCamPosition_Arm::Initialize_Prototype()
|
HRESULT CCamPosition_Arm::Initialize_Prototype()
|
||||||
{
|
{
|
||||||
return S_OK;
|
return S_OK;
|
||||||
@@ -44,6 +42,7 @@ void CCamPosition_Arm::Priority_Update(_float fTimeDelta)
|
|||||||
|
|
||||||
void CCamPosition_Arm::Update(_float fTimeDelta)
|
void CCamPosition_Arm::Update(_float fTimeDelta)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CCamPosition_Arm::Late_Update(_float fTimeDelta)
|
void CCamPosition_Arm::Late_Update(_float fTimeDelta)
|
||||||
@@ -96,12 +95,10 @@ CCamPosition_Arm* CCamPosition_Arm::Clone(void* pArg, class CGameObject* pOWner)
|
|||||||
|
|
||||||
return pInstance;
|
return pInstance;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CCamPosition_Arm::Free()
|
void CCamPosition_Arm::Free()
|
||||||
{
|
{
|
||||||
__super::Free();
|
__super::Free();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CCamPosition_Arm::Describe_Entity()
|
void CCamPosition_Arm::Describe_Entity()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,192 @@
|
|||||||
|
#include "pch.h"
|
||||||
|
#include "CamPosition_Shoulder.h"
|
||||||
|
#include "CamPosition_Target.h"
|
||||||
|
#include "GameInstance.h"
|
||||||
|
#include "Camera_Gaze.h"
|
||||||
|
|
||||||
|
CCamPosition_Shoulder::CCamPosition_Shoulder(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||||
|
: CCamPosition(pDevice, pContext)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
CCamPosition_Shoulder::CCamPosition_Shoulder(const CCamPosition_Shoulder& rhs)
|
||||||
|
: CCamPosition(rhs)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
HRESULT CCamPosition_Shoulder::Initialize_Prototype()
|
||||||
|
{
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
HRESULT CCamPosition_Shoulder::Initialize(void* pArg)
|
||||||
|
{
|
||||||
|
if (FAILED(__super::Initialize(pArg))) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
if (FAILED(Ready_Components(pArg))) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
if (FAILED(Ready_SubParts())) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
CAMERA_SHOULDER_DESC* pDesc = static_cast<CAMERA_SHOULDER_DESC*>(pArg);
|
||||||
|
{
|
||||||
|
m_fMouseSensor = pDesc->fMouseSensor;
|
||||||
|
m_vShoulderPosRatio = pDesc->vInitialLook;
|
||||||
|
m_fShoulderDistance = pDesc->fShoulderDistance;
|
||||||
|
m_vAccDegreeXY = { 0.f, 0.f };
|
||||||
|
m_fCameraFocalLength = pDesc->fCameraFocalLength;
|
||||||
|
m_fBackFrontRatio = pDesc->fBackFrontRatio;
|
||||||
|
m_pTransformCom->Set_State(STATE::POSITION, m_pParentTransformCom->Get_State(STATE::POSITION) + XMVector3Normalize(XMLoadFloat3(&m_vShoulderPosRatio)) * m_fShoulderDistance);
|
||||||
|
|
||||||
|
|
||||||
|
_vector vShoulderPos = Get_WorldPostion();
|
||||||
|
_vector vCameraLook = XMVectorSet(0.f, 0.f, 1.f, 0.f);
|
||||||
|
_vector vRotCameraq = XMQuaternionRotationRollPitchYaw(XMConvertToRadians(m_vAccDegreeXY.x), XMConvertToRadians(m_vAccDegreeXY.y), 0.f);
|
||||||
|
vCameraLook = XMVector3Normalize(XMVector3Rotate(vCameraLook, vRotCameraq));
|
||||||
|
|
||||||
|
CTransform* pLookTransform = m_pTarget_LookPart->Get_Component<CTransform>();
|
||||||
|
CTransform* pFollowTransform = m_pTarget_FollowPart->Get_Component<CTransform>();
|
||||||
|
|
||||||
|
pLookTransform->Set_State(STATE::POSITION, vShoulderPos + vCameraLook * (m_fCameraFocalLength * m_fBackFrontRatio));
|
||||||
|
pFollowTransform->Set_State(STATE::POSITION, vShoulderPos - vCameraLook * (m_fCameraFocalLength * (1 - m_fBackFrontRatio)));
|
||||||
|
}
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCamPosition_Shoulder::Priority_Update(_float fTimeDelta)
|
||||||
|
{
|
||||||
|
if (true == m_bMovable) {
|
||||||
|
m_vAccDegreeXY.y += m_pGameInstance->Get_MouseMove().x * m_fMouseSensor;
|
||||||
|
m_vAccDegreeXY.x += m_pGameInstance->Get_MouseMove().y * m_fMouseSensor;
|
||||||
|
}
|
||||||
|
|
||||||
|
_vector vLook = XMVector3Normalize(XMLoadFloat3(&m_vShoulderPosRatio));
|
||||||
|
_vector vRotq = XMQuaternionRotationRollPitchYaw(0.f, XMConvertToRadians(m_vAccDegreeXY.y), 0.f);
|
||||||
|
vLook = XMVector3Normalize(XMVector3Rotate(vLook, vRotq));
|
||||||
|
|
||||||
|
m_pTransformCom->Set_State(STATE::POSITION, m_pParentTransformCom->Get_State(STATE::POSITION) + XMVector3Normalize(vLook) * m_fShoulderDistance);
|
||||||
|
_vector vShoulderPos = Get_WorldPostion();
|
||||||
|
_vector vCameraLook = XMVectorSet(0.f, 0.f, 1.f, 0.f);
|
||||||
|
_vector vRotCameraq = XMQuaternionRotationRollPitchYaw(XMConvertToRadians(m_vAccDegreeXY.x), XMConvertToRadians(m_vAccDegreeXY.y), 0.f);
|
||||||
|
vCameraLook = XMVector3Normalize(XMVector3Rotate(vCameraLook, vRotCameraq));
|
||||||
|
|
||||||
|
CTransform* pLookTransform = m_pTarget_LookPart->Get_Component<CTransform>();
|
||||||
|
CTransform* pFollowTransform = m_pTarget_FollowPart->Get_Component<CTransform>();
|
||||||
|
|
||||||
|
pLookTransform->Set_State(STATE::POSITION, vShoulderPos + vCameraLook * (m_fCameraFocalLength * m_fBackFrontRatio));
|
||||||
|
pFollowTransform->Set_State(STATE::POSITION, vShoulderPos - vCameraLook * (m_fCameraFocalLength * (1 - m_fBackFrontRatio)));
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCamPosition_Shoulder::Update(_float fTimeDelta)
|
||||||
|
{
|
||||||
|
Describe_Entity();
|
||||||
|
if (m_pGameInstance->Key_Up(DIK_GRAVE)) {
|
||||||
|
m_bMovable = !m_bMovable;
|
||||||
|
}
|
||||||
|
if (m_pGameInstance->Mouse_Down(DIM_RBUTTON)) {
|
||||||
|
m_pGameInstance->Toggle_MouseCenter();
|
||||||
|
}
|
||||||
|
if (m_pGameInstance->Key_Up(DIK_P)) {
|
||||||
|
m_vShoulderPosRatio.x *= -1.f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCamPosition_Shoulder::Late_Update(_float fTimeDelta)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CCamPosition_Shoulder::Render()
|
||||||
|
{
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
_vector CCamPosition_Shoulder::Get_WorldPostion()
|
||||||
|
{
|
||||||
|
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CCamPosition_Shoulder::Ready_Components(void* pArg)
|
||||||
|
{
|
||||||
|
CTransform::TRANSFORM_DESC DescTransfrom = {};
|
||||||
|
DescTransfrom.fRadius = 30.f;
|
||||||
|
DescTransfrom.fRotationPerSec = 0.f;
|
||||||
|
DescTransfrom.fSpeedPerSec = 0.f;
|
||||||
|
if (FAILED(__super::Ready_Components(&DescTransfrom))) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
HRESULT CCamPosition_Shoulder::Ready_SubParts()
|
||||||
|
{
|
||||||
|
{
|
||||||
|
CCamPosition_Target::CAMERAPOSITION_TARGET_DESC Desc{};
|
||||||
|
Desc.pParentTransform = m_pTransformCom;
|
||||||
|
m_pTarget_LookPart = m_pGameInstance->Clone_Prototype< CCamPosition_Target>(g_iStaticLevel, &Desc);
|
||||||
|
m_pTarget_FollowPart = m_pGameInstance->Clone_Prototype< CCamPosition_Target>(g_iStaticLevel, &Desc);
|
||||||
|
}
|
||||||
|
|
||||||
|
CCamera_Gaze::CAMERA_GAZE_DESC CameraDesc{};
|
||||||
|
CameraDesc.fFovy = XMConvertToRadians(60.0f);
|
||||||
|
CameraDesc.fNear = 0.1f;
|
||||||
|
CameraDesc.fFar = 300.f;
|
||||||
|
CameraDesc.fSpeedPerSec = 5.f;
|
||||||
|
CameraDesc.fRotationPerSec = XMConvertToRadians(90.f);
|
||||||
|
CameraDesc.pFollowTarget = m_pTarget_FollowPart;
|
||||||
|
CameraDesc.pLookTarget = m_pTarget_LookPart;
|
||||||
|
CameraDesc.iPriority = 51;
|
||||||
|
|
||||||
|
CCamera_Gaze* pCamera = { nullptr };
|
||||||
|
|
||||||
|
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CCamera_Gaze>(g_iStaticLevel, NEXT_LEVEL, LAYER_CAMERA, &CameraDesc, nullptr, &pCamera)))
|
||||||
|
{
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
m_pGameInstance->Add_Camera(NEXT_LEVEL, pCamera, TEXT("CAM_SHOULDER"));
|
||||||
|
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
CCamPosition_Shoulder* CCamPosition_Shoulder::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||||
|
{
|
||||||
|
CCamPosition_Shoulder* pInstance = new CCamPosition_Shoulder(pDevice, pContext);
|
||||||
|
|
||||||
|
if (FAILED(pInstance->Initialize_Prototype()))
|
||||||
|
{
|
||||||
|
MSG_BOX("Failed to Created : CCamPosition_Shoulder");
|
||||||
|
SAFE_RELEASE(pInstance);
|
||||||
|
}
|
||||||
|
|
||||||
|
return pInstance;
|
||||||
|
}
|
||||||
|
CCamPosition_Shoulder* CCamPosition_Shoulder::Clone(void* pArg, class CGameObject* pOWner)
|
||||||
|
{
|
||||||
|
CCamPosition_Shoulder* pInstance = new CCamPosition_Shoulder(*this);
|
||||||
|
pInstance->m_pOwner = pOWner;
|
||||||
|
if (FAILED(pInstance->Initialize(pArg)))
|
||||||
|
{
|
||||||
|
MSG_BOX("Failed to Cloned : CCamPosition_Shoulder");
|
||||||
|
SAFE_RELEASE(pInstance);
|
||||||
|
}
|
||||||
|
|
||||||
|
return pInstance;
|
||||||
|
}
|
||||||
|
void CCamPosition_Shoulder::Free()
|
||||||
|
{
|
||||||
|
__super::Free();
|
||||||
|
|
||||||
|
SAFE_RELEASE(m_pTarget_LookPart);
|
||||||
|
SAFE_RELEASE(m_pTarget_FollowPart);
|
||||||
|
}
|
||||||
|
void CCamPosition_Shoulder::Describe_Entity()
|
||||||
|
{
|
||||||
|
GUI::Begin("Cam_Shoulder");
|
||||||
|
m_pTransformCom->Describe_Entity();
|
||||||
|
GUI::Text("fMouseSensor : %.1f", &m_fMouseSensor);
|
||||||
|
GUI::SliderFloat("ShoulderDistance", &m_fShoulderDistance, 0.f, 10.f, "%.1f");
|
||||||
|
GUI::SliderFloat("BackFrontRatio", &m_fBackFrontRatio, 0.01f, 0.99f, "%.2f");
|
||||||
|
GUI::Text("Pitch Yaw : %f %f", &m_vAccDegreeXY.x, &m_vAccDegreeXY.y);
|
||||||
|
GUI::SliderFloat3("ShoulderPosRatio", (_float*)&m_vShoulderPosRatio, -2.f, 2.f, "%.1f");
|
||||||
|
GUI::End();
|
||||||
|
}
|
||||||
+18
-18
@@ -1,18 +1,18 @@
|
|||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
|
|
||||||
#include "CamPosition_Player.h"
|
#include "CamPosition_Socket.h"
|
||||||
|
|
||||||
CCamPosition_Player::CCamPosition_Player(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
CCamPosition_Socket::CCamPosition_Socket(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||||
:CCamPosition(pDevice, pContext)
|
:CCamPosition(pDevice, pContext)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
CCamPosition_Player::CCamPosition_Player(const CCamPosition_Player& rhs)
|
CCamPosition_Socket::CCamPosition_Socket(const CCamPosition_Socket& rhs)
|
||||||
:CCamPosition(rhs)
|
:CCamPosition(rhs)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void CCamPosition_Player::Priority_Update(_float fTimeDelta)
|
void CCamPosition_Socket::Priority_Update(_float fTimeDelta)
|
||||||
{
|
{
|
||||||
/*_matrix socketMatrix = {};
|
/*_matrix socketMatrix = {};
|
||||||
|
|
||||||
@@ -24,20 +24,20 @@ void CCamPosition_Player::Priority_Update(_float fTimeDelta)
|
|||||||
m_pTransformCom->Set_WorldMatrix(/*socketMatrix * */XMLoadFloat4x4(m_pParentTransformCom->Get_WorldMatrixPtr()));
|
m_pTransformCom->Set_WorldMatrix(/*socketMatrix * */XMLoadFloat4x4(m_pParentTransformCom->Get_WorldMatrixPtr()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CCamPosition_Player::Update(_float fTimeDelta)
|
void CCamPosition_Socket::Update(_float fTimeDelta)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void CCamPosition_Player::Late_Update(_float fTimeDelta)
|
void CCamPosition_Socket::Late_Update(_float fTimeDelta)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT CCamPosition_Player::Initialize_Prototype()
|
HRESULT CCamPosition_Socket::Initialize_Prototype()
|
||||||
{
|
{
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT CCamPosition_Player::Initialize(void* pArg)
|
HRESULT CCamPosition_Socket::Initialize(void* pArg)
|
||||||
{
|
{
|
||||||
CAMERAPOSITION_PLAYER_DESC* pDesc = static_cast<CAMERAPOSITION_PLAYER_DESC*> (pArg);
|
CAMERAPOSITION_PLAYER_DESC* pDesc = static_cast<CAMERAPOSITION_PLAYER_DESC*> (pArg);
|
||||||
//m_pSocketMatrices = pDesc->pSocketMatrices;
|
//m_pSocketMatrices = pDesc->pSocketMatrices;
|
||||||
@@ -54,7 +54,7 @@ HRESULT CCamPosition_Player::Initialize(void* pArg)
|
|||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT CCamPosition_Player::Ready_Components(void* pArg)
|
HRESULT CCamPosition_Socket::Ready_Components(void* pArg)
|
||||||
{
|
{
|
||||||
if (FAILED(__super::Ready_Components(pArg)))
|
if (FAILED(__super::Ready_Components(pArg)))
|
||||||
{
|
{
|
||||||
@@ -64,42 +64,42 @@ HRESULT CCamPosition_Player::Ready_Components(void* pArg)
|
|||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT CCamPosition_Player::Bind_ShaderResources()
|
HRESULT CCamPosition_Socket::Bind_ShaderResources()
|
||||||
{
|
{
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
CCamPosition_Player* CCamPosition_Player::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
CCamPosition_Socket* CCamPosition_Socket::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||||
{
|
{
|
||||||
CCamPosition_Player* pInstance = new CCamPosition_Player(pDevice, pContext);
|
CCamPosition_Socket* pInstance = new CCamPosition_Socket(pDevice, pContext);
|
||||||
|
|
||||||
if (FAILED(pInstance->Initialize_Prototype()))
|
if (FAILED(pInstance->Initialize_Prototype()))
|
||||||
{
|
{
|
||||||
MSG_BOX("Failed to Created : CCamPosition_Player");
|
MSG_BOX("Failed to Created : CCamPosition_Socket");
|
||||||
SAFE_RELEASE(pInstance);
|
SAFE_RELEASE(pInstance);
|
||||||
}
|
}
|
||||||
|
|
||||||
return pInstance;
|
return pInstance;
|
||||||
}
|
}
|
||||||
|
|
||||||
CCamPosition_Player* CCamPosition_Player::Clone(void* pArg, class CGameObject* pOWner)
|
CCamPosition_Socket* CCamPosition_Socket::Clone(void* pArg, class CGameObject* pOWner)
|
||||||
{
|
{
|
||||||
CCamPosition_Player* pInstance = new CCamPosition_Player(*this);
|
CCamPosition_Socket* pInstance = new CCamPosition_Socket(*this);
|
||||||
pInstance->m_pOwner = pOWner;
|
pInstance->m_pOwner = pOWner;
|
||||||
if (FAILED(pInstance->Initialize(pArg)))
|
if (FAILED(pInstance->Initialize(pArg)))
|
||||||
{
|
{
|
||||||
MSG_BOX("Failed to Cloned : CCamPosition_Player");
|
MSG_BOX("Failed to Cloned : CCamPosition_Socket");
|
||||||
SAFE_RELEASE(pInstance);
|
SAFE_RELEASE(pInstance);
|
||||||
}
|
}
|
||||||
|
|
||||||
return pInstance;
|
return pInstance;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CCamPosition_Player::Free()
|
void CCamPosition_Socket::Free()
|
||||||
{
|
{
|
||||||
__super::Free();
|
__super::Free();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CCamPosition_Player::Describe_Entity()
|
void CCamPosition_Socket::Describe_Entity()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,94 @@
|
|||||||
|
#include "pch.h"
|
||||||
|
|
||||||
|
#include "CamPosition_Target.h"
|
||||||
|
|
||||||
|
CCamPosition_Target::CCamPosition_Target(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||||
|
:CCamPosition(pDevice, pContext)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
CCamPosition_Target::CCamPosition_Target(const CCamPosition_Target& rhs)
|
||||||
|
:CCamPosition(rhs)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCamPosition_Target::Priority_Update(_float fTimeDelta)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCamPosition_Target::Update(_float fTimeDelta)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCamPosition_Target::Late_Update(_float fTimeDelta)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
_vector CCamPosition_Target::Get_WorldPostion()
|
||||||
|
{
|
||||||
|
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CCamPosition_Target::Initialize_Prototype()
|
||||||
|
{
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
HRESULT CCamPosition_Target::Initialize(void* pArg)
|
||||||
|
{
|
||||||
|
CAMERAPOSITION_TARGET_DESC* pDesc = static_cast<CAMERAPOSITION_TARGET_DESC*> (pArg);
|
||||||
|
if (FAILED(__super::Initialize(pArg))) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (FAILED(Ready_Components(pArg))) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CCamPosition_Target::Ready_Components(void* pArg)
|
||||||
|
{
|
||||||
|
if (FAILED(__super::Ready_Components(pArg)))
|
||||||
|
{
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CCamPosition_Target::Bind_ShaderResources()
|
||||||
|
{
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
CCamPosition_Target* CCamPosition_Target::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||||
|
{
|
||||||
|
CCamPosition_Target* pInstance = new CCamPosition_Target(pDevice, pContext);
|
||||||
|
|
||||||
|
if (FAILED(pInstance->Initialize_Prototype()))
|
||||||
|
{
|
||||||
|
MSG_BOX("Failed to Created : CCamPosition_Target");
|
||||||
|
SAFE_RELEASE(pInstance);
|
||||||
|
}
|
||||||
|
|
||||||
|
return pInstance;
|
||||||
|
}
|
||||||
|
CCamPosition_Target* CCamPosition_Target::Clone(void* pArg, class CGameObject* pOWner)
|
||||||
|
{
|
||||||
|
CCamPosition_Target* pInstance = new CCamPosition_Target(*this);
|
||||||
|
pInstance->m_pOwner = pOWner;
|
||||||
|
if (FAILED(pInstance->Initialize(pArg)))
|
||||||
|
{
|
||||||
|
MSG_BOX("Failed to Cloned : CCamPosition_Target");
|
||||||
|
SAFE_RELEASE(pInstance);
|
||||||
|
}
|
||||||
|
|
||||||
|
return pInstance;
|
||||||
|
}
|
||||||
|
void CCamPosition_Target::Free()
|
||||||
|
{
|
||||||
|
__super::Free();
|
||||||
|
}
|
||||||
|
void CCamPosition_Target::Describe_Entity()
|
||||||
|
{
|
||||||
|
}
|
||||||
@@ -40,7 +40,7 @@ HRESULT CLevel_Field::Initialize()
|
|||||||
|
|
||||||
void CLevel_Field::Update(_float fTimeDelta)
|
void CLevel_Field::Update(_float fTimeDelta)
|
||||||
{
|
{
|
||||||
if (m_pGameInstance->Mouse_Up(DIM_RBUTTON))
|
if (m_pGameInstance->Key_Up(DIK_0))
|
||||||
{
|
{
|
||||||
m_pGameInstance->Set_LevelToChange();
|
m_pGameInstance->Set_LevelToChange();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ HRESULT CLevel_GamePlay::Initialize()
|
|||||||
|
|
||||||
void CLevel_GamePlay::Update(_float fTimeDelta)
|
void CLevel_GamePlay::Update(_float fTimeDelta)
|
||||||
{
|
{
|
||||||
if (m_pGameInstance->Mouse_Up(DIM_RBUTTON))
|
if (m_pGameInstance->Key_Up(DIK_0))
|
||||||
{
|
{
|
||||||
m_pGameInstance->Set_LevelToChange();
|
m_pGameInstance->Set_LevelToChange();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ HRESULT CLevel_Logo::Initialize()
|
|||||||
|
|
||||||
void CLevel_Logo::Update(_float fTimeDelta)
|
void CLevel_Logo::Update(_float fTimeDelta)
|
||||||
{
|
{
|
||||||
if (m_pGameInstance->Mouse_Up(DIM_RBUTTON))
|
if (m_pGameInstance->Key_Up(DIK_0))
|
||||||
{
|
{
|
||||||
m_pGameInstance->Set_LevelToChange();
|
m_pGameInstance->Set_LevelToChange();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ HRESULT CLevel_Restart::Initialize()
|
|||||||
|
|
||||||
void CLevel_Restart::Update(_float fTimeDelta)
|
void CLevel_Restart::Update(_float fTimeDelta)
|
||||||
{
|
{
|
||||||
if (m_pGameInstance->Mouse_Up(DIM_RBUTTON))
|
if (m_pGameInstance->Key_Up(DIK_0))
|
||||||
{
|
{
|
||||||
m_pGameInstance->Set_LevelToChange();
|
m_pGameInstance->Set_LevelToChange();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,9 @@
|
|||||||
|
|
||||||
#include "Player.h"
|
#include "Player.h"
|
||||||
#include "Camera_Gaze.h"
|
#include "Camera_Gaze.h"
|
||||||
#include "CamPosition_Player.h"
|
#include "CamPosition_Socket.h"
|
||||||
|
#include "CamPosition_Target.h"
|
||||||
|
#include "CamPosition_Shoulder.h"
|
||||||
#include "CamPosition_Arm.h"
|
#include "CamPosition_Arm.h"
|
||||||
#include "Wand.h"
|
#include "Wand.h"
|
||||||
#include "SkyBox.h"
|
#include "SkyBox.h"
|
||||||
@@ -231,7 +233,15 @@ HRESULT CLoader::Loading_For_GamePlay()
|
|||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
|
|
||||||
/* For.Prototype_GameObject_CamPosition_Player */
|
/* For.Prototype_GameObject_CamPosition_Player */
|
||||||
if (FAILED(m_pGameInstance->Add_Prototype<CCamPosition_Player>(g_iStaticLevel, CCamPosition_Player::Create(m_pDevice, m_pContext))))
|
if (FAILED(m_pGameInstance->Add_Prototype<CCamPosition_Socket>(g_iStaticLevel, CCamPosition_Socket::Create(m_pDevice, m_pContext))))
|
||||||
|
return E_FAIL;
|
||||||
|
|
||||||
|
/* For.Prototype_GameObject_CamPosition_Shoulder */
|
||||||
|
if (FAILED(m_pGameInstance->Add_Prototype<CCamPosition_Shoulder>(g_iStaticLevel, CCamPosition_Shoulder::Create(m_pDevice, m_pContext))))
|
||||||
|
return E_FAIL;
|
||||||
|
|
||||||
|
/* For.Prototype_GameObject_CamPosition_Target */
|
||||||
|
if (FAILED(m_pGameInstance->Add_Prototype<CCamPosition_Target>(g_iStaticLevel, CCamPosition_Target::Create(m_pDevice, m_pContext))))
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
|
|
||||||
/* For.Prototype_GameObject_CamPosition_Arm */
|
/* For.Prototype_GameObject_CamPosition_Arm */
|
||||||
|
|||||||
@@ -130,16 +130,21 @@ HRESULT CMainApp::Ready_IMGUI()
|
|||||||
ImGui_ImplWin32_Init(g_hWnd);
|
ImGui_ImplWin32_Init(g_hWnd);
|
||||||
ImGui_ImplDX11_Init(m_pDevice, m_pContext);
|
ImGui_ImplDX11_Init(m_pDevice, m_pContext);
|
||||||
|
|
||||||
string strFontTag = "../Bin/Resources/Fonts/SHOWG.TTF";
|
//string strFontTag = "C:\\Windows\\Fonts\\malgun.ttf";
|
||||||
|
string strFontTag = "../Bin/Resources/Fonts/malgunsl.TTF";
|
||||||
|
ImFontConfig cfg;
|
||||||
|
cfg.OversampleH = 2; // 가독성 향상
|
||||||
|
cfg.OversampleV = 2;
|
||||||
|
cfg.PixelSnapH = true;
|
||||||
ifstream ifile;
|
ifstream ifile;
|
||||||
|
|
||||||
ifile.open(strFontTag);
|
ifile.open(strFontTag);
|
||||||
if (ifile)
|
if (ifile)
|
||||||
{
|
{
|
||||||
font = io.Fonts->AddFontFromFileTTF(strFontTag.c_str(), 10.f, NULL, io.Fonts->GetGlyphRangesKorean());
|
font = io.Fonts->AddFontFromFileTTF(strFontTag.c_str(), 16.f, NULL, io.Fonts->GetGlyphRangesKorean());
|
||||||
}
|
}
|
||||||
IM_ASSERT(font != NULL);
|
IM_ASSERT(font != NULL);
|
||||||
|
io.FontDefault = font;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,14 +2,14 @@
|
|||||||
#include "Player.h"
|
#include "Player.h"
|
||||||
|
|
||||||
#include "GameInstance.h"
|
#include "GameInstance.h"
|
||||||
#include "CamPosition_Player.h"
|
#include "CamPosition_Socket.h"
|
||||||
#include "Camera_Gaze.h"
|
#include "Camera_Gaze.h"
|
||||||
#include "CamPosition_Arm.h"
|
#include "CamPosition_Arm.h"
|
||||||
#include "Wand.h"
|
#include "Wand.h"
|
||||||
#include "Character_Controller.h"
|
#include "Character_Controller.h"
|
||||||
#include "CallBack_Playable_Behavior.h"
|
#include "CallBack_Playable_Behavior.h"
|
||||||
|
#include "CamPosition_Shoulder.h"
|
||||||
#include "CallBack_Playable_HitReport.h"
|
#include "CallBack_Playable_HitReport.h"
|
||||||
#include "Character_Controller.h"
|
|
||||||
|
|
||||||
#pragma region STATE
|
#pragma region STATE
|
||||||
|
|
||||||
@@ -207,46 +207,62 @@ HRESULT CPlayer::Ready_Parts()
|
|||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
CCamPosition_Player::CAMERAPOSITION_PLAYER_DESC Desc{};
|
//{
|
||||||
|
// CCamPosition_Socket::CAMERAPOSITION_PLAYER_DESC Desc{};
|
||||||
|
|
||||||
Desc.pParentTransform = m_pTransformCom;
|
// Desc.pParentTransform = m_pTransformCom;
|
||||||
|
|
||||||
|
// if (FAILED(Add_PartObject<CCamPosition_Socket>("Cam_TopDown_Look", g_iStaticLevel, &m_pCamPosition_TopDown_LookPart, &Desc)))
|
||||||
|
// {
|
||||||
|
// return E_FAIL;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// CCamPosition_Arm::CameraArm_DESC CameraArmDesc{};
|
||||||
|
// XMStoreFloat3(&CameraArmDesc.fAt, m_pTransformCom->Get_State(STATE::POSITION));
|
||||||
|
// CameraArmDesc.pParentTransform = m_pTransformCom;
|
||||||
|
// CameraArmDesc.fEye = { 0.f, 10.f, 10.f };
|
||||||
|
// CameraArmDesc.fMouseSensor = 0.4f;
|
||||||
|
// CameraArmDesc.fDistance = 4.f;
|
||||||
|
// CameraArmDesc.pParentTransform = m_pTransformCom;
|
||||||
|
|
||||||
|
// if (FAILED(Add_PartObject<CCamPosition_Arm>("Cam_TopDown_Follow", g_iStaticLevel, &m_pCamPosition_TopDown_FollowPart, &CameraArmDesc))) {
|
||||||
|
// return E_FAIL;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// CCamera_Gaze::CAMERA_GAZE_DESC CameraDesc{};
|
||||||
|
// CameraDesc.fFovy = XMConvertToRadians(60.0f);
|
||||||
|
// CameraDesc.fNear = 0.1f;
|
||||||
|
// CameraDesc.fFar = 300.f;
|
||||||
|
// CameraDesc.fSpeedPerSec = 5.f;
|
||||||
|
// CameraDesc.fRotationPerSec = XMConvertToRadians(90.f);
|
||||||
|
// CameraDesc.pFollowTarget = m_pCamPosition_TopDown_FollowPart;
|
||||||
|
// CameraDesc.pLookTarget = m_pCamPosition_TopDown_LookPart;
|
||||||
|
// CameraDesc.iPriority = 51;
|
||||||
|
|
||||||
|
// CCamera_Gaze* pCamera = { nullptr };
|
||||||
|
|
||||||
|
// if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CCamera_Gaze>(g_iStaticLevel, NEXT_LEVEL, LAYER_CAMERA, &CameraDesc, nullptr, &pCamera)))
|
||||||
|
// {
|
||||||
|
// return E_FAIL;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// m_pGameInstance->Add_Camera(NEXT_LEVEL, pCamera, TEXT("CAM_TOPVIEW"));
|
||||||
|
//}
|
||||||
|
|
||||||
if (FAILED(Add_PartObject<CCamPosition_Player>("Cam_TopDown_Look", g_iStaticLevel, &m_pCamPosition_TopDown_LookPart, &Desc)))
|
|
||||||
{
|
{
|
||||||
return E_FAIL;
|
CCamPosition_Shoulder::CAMERA_SHOULDER_DESC Desc;
|
||||||
|
Desc.pParentTransform = m_pTransformCom;
|
||||||
|
Desc.fMouseSensor = 0.5f;
|
||||||
|
Desc.fShoulderDistance = 2.f;
|
||||||
|
Desc.fBackFrontRatio = 0.9f;
|
||||||
|
Desc.fCameraFocalLength = 10.f;
|
||||||
|
Desc.vInitialLook = { 1.f, 2.f, -1.f };
|
||||||
|
|
||||||
|
if (FAILED(Add_PartObject<CCamPosition_Shoulder>("Cam_Shoulder_Part", g_iStaticLevel, &m_pCamPosition_ShoulderPart, &Desc))) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CCamPosition_Arm::CameraArm_DESC CameraArmDesc{};
|
|
||||||
XMStoreFloat3(&CameraArmDesc.fAt, m_pTransformCom->Get_State(STATE::POSITION));
|
|
||||||
CameraArmDesc.pParentTransform = m_pTransformCom;
|
|
||||||
CameraArmDesc.fEye = { 0.f, 10.f, 10.f };
|
|
||||||
CameraArmDesc.fMouseSensor = 0.4f;
|
|
||||||
CameraArmDesc.fDistance = 4.f;
|
|
||||||
CameraArmDesc.pParentTransform = m_pTransformCom;
|
|
||||||
|
|
||||||
if (FAILED(Add_PartObject<CCamPosition_Arm>("Cam_TopDown_Follow", g_iStaticLevel, &m_pCamPosition_TopDown_FollowPart, &CameraArmDesc))) {
|
|
||||||
return E_FAIL;
|
|
||||||
}
|
|
||||||
|
|
||||||
CCamera_Gaze::CAMERA_GAZE_DESC CameraDesc{};
|
|
||||||
CameraDesc.fFovy = XMConvertToRadians(60.0f);
|
|
||||||
CameraDesc.fNear = 0.1f;
|
|
||||||
CameraDesc.fFar = 300.f;
|
|
||||||
CameraDesc.fSpeedPerSec = 5.f;
|
|
||||||
CameraDesc.fRotationPerSec = XMConvertToRadians(90.f);
|
|
||||||
CameraDesc.pFollowTarget = m_pCamPosition_TopDown_FollowPart;
|
|
||||||
CameraDesc.pLookTarget = m_pCamPosition_TopDown_LookPart;
|
|
||||||
CameraDesc.iPriority = 51;
|
|
||||||
|
|
||||||
CCamera_Gaze* pCamera = { nullptr };
|
|
||||||
|
|
||||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CCamera_Gaze>(g_iStaticLevel, NEXT_LEVEL, LAYER_CAMERA, &CameraDesc, nullptr, &pCamera)))
|
|
||||||
{
|
|
||||||
return E_FAIL;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_pGameInstance->Add_Camera(NEXT_LEVEL, pCamera, TEXT("CAM_TOPVIEW"));
|
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -268,6 +284,8 @@ HRESULT CPlayer::Bind_ShaderResources()
|
|||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma region STATE
|
||||||
|
|
||||||
HRESULT CPlayer::InputSystem()
|
HRESULT CPlayer::InputSystem()
|
||||||
{
|
{
|
||||||
if (m_pGameInstance->Key_Down(DIK_1)
|
if (m_pGameInstance->Key_Down(DIK_1)
|
||||||
@@ -589,6 +607,7 @@ void CPlayer::Behavior_DodgeExit()
|
|||||||
m_pFSM->Disable_State(FSMSTATE::DODGE);
|
m_pFSM->Disable_State(FSMSTATE::DODGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CPlayer::Add_FSM()
|
void CPlayer::Add_FSM()
|
||||||
{
|
{
|
||||||
#pragma region Behavior_Movement_NotFocus
|
#pragma region Behavior_Movement_NotFocus
|
||||||
@@ -680,6 +699,7 @@ void CPlayer::Set_Anim()
|
|||||||
m_Animation[STATEANIM::SPRINT] = { 599,true };
|
m_Animation[STATEANIM::SPRINT] = { 599,true };
|
||||||
|
|
||||||
}
|
}
|
||||||
|
#pragma endregion STATE
|
||||||
|
|
||||||
CPlayer* CPlayer::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
CPlayer* CPlayer::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||||
{
|
{
|
||||||
@@ -721,6 +741,7 @@ void CPlayer::Free()
|
|||||||
Safe_Delete(m_pCallBack_HitReport);
|
Safe_Delete(m_pCallBack_HitReport);
|
||||||
SAFE_RELEASE(m_pCamPosition_TopDown_FollowPart);
|
SAFE_RELEASE(m_pCamPosition_TopDown_FollowPart);
|
||||||
SAFE_RELEASE(m_pCamPosition_TopDown_LookPart);
|
SAFE_RELEASE(m_pCamPosition_TopDown_LookPart);
|
||||||
|
SAFE_RELEASE(m_pCamPosition_ShoulderPart);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPlayer::Describe_Entity()
|
void CPlayer::Describe_Entity()
|
||||||
|
|||||||
@@ -0,0 +1,56 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "Client_Define.h"
|
||||||
|
#include "CamPosition.h"
|
||||||
|
#include "CamPosition_Target.h"
|
||||||
|
|
||||||
|
NS_BEGIN(Client)
|
||||||
|
|
||||||
|
class CCamPosition_Shoulder final : public CCamPosition
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
typedef struct tagCameraShoulder_Desc : public CCamPosition::CAMERAPOSITION_DESC
|
||||||
|
{
|
||||||
|
_float fMouseSensor = { 0.5f };
|
||||||
|
_float fShoulderDistance = { 2.f };
|
||||||
|
_float fBackFrontRatio = { 0.9f };
|
||||||
|
_float fCameraFocalLength = { 10.f };
|
||||||
|
_float3 vInitialLook = { 1.f, 2.f, -1.f };
|
||||||
|
}CAMERA_SHOULDER_DESC;
|
||||||
|
private:
|
||||||
|
CCamPosition_Shoulder(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||||
|
CCamPosition_Shoulder(const CCamPosition_Shoulder& rhs);
|
||||||
|
virtual ~CCamPosition_Shoulder() = default;
|
||||||
|
|
||||||
|
public:
|
||||||
|
virtual void Priority_Update(_float fTimeDelta) override;
|
||||||
|
virtual void Update(_float fTimeDelta) override;
|
||||||
|
virtual void Late_Update(_float fTimeDelta) override;
|
||||||
|
virtual HRESULT Render() override;
|
||||||
|
virtual _vector Get_WorldPostion() override;
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
virtual HRESULT Initialize_Prototype() override;
|
||||||
|
virtual HRESULT Initialize(void* pArg) override;
|
||||||
|
HRESULT Ready_Components(void* pArg);
|
||||||
|
HRESULT Ready_SubParts();
|
||||||
|
|
||||||
|
_bool m_bMovable = { true };
|
||||||
|
_float m_fMouseSensor = { 0.5f };
|
||||||
|
_float m_fShoulderDistance = { 2.f };
|
||||||
|
_float m_fCameraFocalLength = { 10.f };
|
||||||
|
_float m_fBackFrontRatio = { 0.9f };
|
||||||
|
_float2 m_vAccDegreeXY = {};
|
||||||
|
_float3 m_vShoulderPosRatio = { 1.f, 2.f, -1.f };
|
||||||
|
|
||||||
|
CCamPosition_Target* m_pTarget_LookPart = { nullptr };
|
||||||
|
CCamPosition_Target* m_pTarget_FollowPart = { nullptr };
|
||||||
|
|
||||||
|
public:
|
||||||
|
static CCamPosition_Shoulder* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||||
|
virtual CCamPosition_Shoulder* Clone(void* pArg, class CGameObject* pOWner) override;
|
||||||
|
virtual void Free() override;
|
||||||
|
void Describe_Entity() override;
|
||||||
|
};
|
||||||
|
|
||||||
|
NS_END
|
||||||
+6
-6
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
NS_BEGIN(Client)
|
NS_BEGIN(Client)
|
||||||
|
|
||||||
class CCamPosition_Player final : public CCamPosition
|
class CCamPosition_Socket final : public CCamPosition
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef struct tagCamPosition_Player : public CCamPosition::CAMERAPOSITION_DESC
|
typedef struct tagCamPosition_Player : public CCamPosition::CAMERAPOSITION_DESC
|
||||||
@@ -12,9 +12,9 @@ class CCamPosition_Player final : public CCamPosition
|
|||||||
const _float4x4* pSocketMatrices = { };
|
const _float4x4* pSocketMatrices = { };
|
||||||
}CAMERAPOSITION_PLAYER_DESC;
|
}CAMERAPOSITION_PLAYER_DESC;
|
||||||
private:
|
private:
|
||||||
CCamPosition_Player(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
CCamPosition_Socket(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||||
CCamPosition_Player(const CCamPosition_Player& rhs);
|
CCamPosition_Socket(const CCamPosition_Socket& rhs);
|
||||||
virtual ~CCamPosition_Player() = default;
|
virtual ~CCamPosition_Socket() = default;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual void Priority_Update(_float fTimeDelta) override;
|
virtual void Priority_Update(_float fTimeDelta) override;
|
||||||
@@ -30,8 +30,8 @@ class CCamPosition_Player final : public CCamPosition
|
|||||||
const _float4x4* m_pSocketMatrices = { };
|
const _float4x4* m_pSocketMatrices = { };
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static CCamPosition_Player* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
static CCamPosition_Socket* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||||
virtual CCamPosition_Player* Clone(void* pArg, class CGameObject* pOWner) override;
|
virtual CCamPosition_Socket* Clone(void* pArg, class CGameObject* pOWner) override;
|
||||||
virtual void Free() override;
|
virtual void Free() override;
|
||||||
void Describe_Entity() override;
|
void Describe_Entity() override;
|
||||||
};
|
};
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "Client_Define.h"
|
||||||
|
#include "CamPosition.h"
|
||||||
|
|
||||||
|
NS_BEGIN(Client)
|
||||||
|
|
||||||
|
class CCamPosition_Target final : public CCamPosition
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
typedef struct tagCamPosition_Target : public CCamPosition::CAMERAPOSITION_DESC
|
||||||
|
{
|
||||||
|
}CAMERAPOSITION_TARGET_DESC;
|
||||||
|
private:
|
||||||
|
CCamPosition_Target(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||||
|
CCamPosition_Target(const CCamPosition_Target& rhs);
|
||||||
|
virtual ~CCamPosition_Target() = default;
|
||||||
|
|
||||||
|
public:
|
||||||
|
virtual void Priority_Update(_float fTimeDelta) override;
|
||||||
|
virtual void Update(_float fTimeDelta) override;
|
||||||
|
virtual void Late_Update(_float fTimeDelta) override;
|
||||||
|
virtual _vector Get_WorldPostion() override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
virtual HRESULT Initialize_Prototype() override;
|
||||||
|
virtual HRESULT Initialize(void* pArg) override;
|
||||||
|
HRESULT Ready_Components(void* pArg);
|
||||||
|
HRESULT Bind_ShaderResources() override;
|
||||||
|
|
||||||
|
public:
|
||||||
|
static CCamPosition_Target* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||||
|
virtual CCamPosition_Target* Clone(void* pArg, class CGameObject* pOWner) override;
|
||||||
|
virtual void Free() override;
|
||||||
|
void Describe_Entity() override;
|
||||||
|
};
|
||||||
|
|
||||||
|
NS_END
|
||||||
@@ -10,6 +10,9 @@ class CCamera_Gaze final : public CCamera
|
|||||||
public:
|
public:
|
||||||
typedef struct tagCamera_Gaze : public CCamera::CAMERA_DESC
|
typedef struct tagCamera_Gaze : public CCamera::CAMERA_DESC
|
||||||
{
|
{
|
||||||
|
_bool bTransitionLerp = { false };
|
||||||
|
_bool bLookLerp = { false };
|
||||||
|
_bool bFollowLerp = { false };
|
||||||
}CAMERA_GAZE_DESC;
|
}CAMERA_GAZE_DESC;
|
||||||
private:
|
private:
|
||||||
CCamera_Gaze(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
CCamera_Gaze(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||||
|
|||||||
@@ -37,8 +37,9 @@ class CPlayer final : public CUnit
|
|||||||
_bool m_bSprintToggle = { false };
|
_bool m_bSprintToggle = { false };
|
||||||
_bool m_bWalkToggle = { false };
|
_bool m_bWalkToggle = { false };
|
||||||
|
|
||||||
class CCamPosition_Player* m_pCamPosition_TopDown_LookPart = { nullptr };
|
class CCamPosition_Socket* m_pCamPosition_TopDown_LookPart = { nullptr };
|
||||||
class CCamPosition_Arm* m_pCamPosition_TopDown_FollowPart = { nullptr };
|
class CCamPosition_Arm* m_pCamPosition_TopDown_FollowPart = { nullptr };
|
||||||
|
class CCamPosition_Shoulder* m_pCamPosition_ShoulderPart = { nullptr };
|
||||||
|
|
||||||
CCharacter_Controller* m_pCharacter_Controller = { nullptr };
|
CCharacter_Controller* m_pCharacter_Controller = { nullptr };
|
||||||
CRigidBody_Dynamic* m_pRigidBody = { nullptr };
|
CRigidBody_Dynamic* m_pRigidBody = { nullptr };
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ CCamPosition_Player* CCamPosition_Player::Create(ID3D11Device* pDevice, ID3D11De
|
|||||||
|
|
||||||
if (FAILED(pInstance->Initialize_Prototype()))
|
if (FAILED(pInstance->Initialize_Prototype()))
|
||||||
{
|
{
|
||||||
MSG_BOX("Failed to Created : CCamPosition_Player");
|
MSG_BOX("Failed to Created : CCamPosition_Socket");
|
||||||
SAFE_RELEASE(pInstance);
|
SAFE_RELEASE(pInstance);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -88,7 +88,7 @@ CCamPosition_Player* CCamPosition_Player::Clone(void* pArg, class CGameObject* p
|
|||||||
pInstance->m_pOwner = pOWner;
|
pInstance->m_pOwner = pOWner;
|
||||||
if (FAILED(pInstance->Initialize(pArg)))
|
if (FAILED(pInstance->Initialize(pArg)))
|
||||||
{
|
{
|
||||||
MSG_BOX("Failed to Cloned : CCamPosition_Player");
|
MSG_BOX("Failed to Cloned : CCamPosition_Socket");
|
||||||
SAFE_RELEASE(pInstance);
|
SAFE_RELEASE(pInstance);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "MainApp.h"
|
#include "MainApp.h"
|
||||||
|
|
||||||
#include "GameInstance.h"
|
#include "GameInstance.h"
|
||||||
@@ -111,7 +111,7 @@ HRESULT CMainApp::Ready_IMGUI()
|
|||||||
//string strFontTag = "C:\\Windows\\Fonts\\malgun.ttf";
|
//string strFontTag = "C:\\Windows\\Fonts\\malgun.ttf";
|
||||||
string strFontTag = "../Bin/Resources/Fonts/malgunsl.TTF";
|
string strFontTag = "../Bin/Resources/Fonts/malgunsl.TTF";
|
||||||
ImFontConfig cfg;
|
ImFontConfig cfg;
|
||||||
cfg.OversampleH = 2; // 가독성 향상
|
cfg.OversampleH = 2; // 가독성 향상
|
||||||
cfg.OversampleV = 2;
|
cfg.OversampleV = 2;
|
||||||
cfg.PixelSnapH = true;
|
cfg.PixelSnapH = true;
|
||||||
ifstream ifile;
|
ifstream ifile;
|
||||||
|
|||||||
Reference in New Issue
Block a user