[fix] NPC_Collider

[add] CameraModel
This commit is contained in:
kimnuri
2026-01-03 22:06:05 +09:00
parent 8b36c7206e
commit ea7257edbf
25 changed files with 104 additions and 159 deletions
@@ -174,7 +174,7 @@ PS_OUT PS_Logo_Text(PS_IN In)
Color.rgb = (Color.rgb - 0.5f) * 1.2f + 0.5f;
Color.rgb = pow(Color.rgb, 1.25f);
Color.rgb = pow(clamp(Color.rgb, 0.f, 1.f), 1.25f);
float luminance = dot(Color.rgb, float3(0.299f, 0.587f, 0.114f));
float light = smoothstep(0.7f, 0.92f, luminance);
@@ -179,7 +179,6 @@ ATOM MyRegisterClass(HINSTANCE hInstance)
BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
{
g_hInstance = hInstance;
#ifdef _DEBUG
RECT rcWindow = { 0, 0, g_iWinSizeX, g_iWinSizeY };
AdjustWindowRect(&rcWindow, WS_OVERLAPPEDWINDOW, FALSE);
@@ -196,7 +195,6 @@ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
UpdateWindow(hWnd);
g_hWnd = hWnd;
#endif // _DEBUG
#ifdef Bin
#ifndef _DEBUG
@@ -45,7 +45,6 @@ HRESULT CMapElement_Door::Initialize(void* pArg)
void CMapElement_Door::Priority_Update(_float fTimeDelta)
{
GUI::Text("m_vKinematicTimer %.3f", m_vKinematicTimer.x);
if (m_vKinematicTimer.x != 0) {
m_vKinematicTimer.x += fTimeDelta;
if (m_vKinematicTimer.y < m_vKinematicTimer.x) {
@@ -60,8 +59,7 @@ void CMapElement_Door::Priority_Update(_float fTimeDelta)
void CMapElement_Door::ActingIdle()
{
_float fCurrentDegree = XMConvertToDegrees(m_pJoint->getAngle());
GUI::Text("%.2f", fCurrentDegree);
GUI::Text("%.2f", m_pJoint->getVelocity());
if (fabsf(fCurrentDegree) >= 2.f) { // 각도가 벌어져 있는데
if (false == m_bDrive) { // 드라이브 중이 아니면 드라이브시킴
m_bDrive = true;
@@ -269,6 +267,10 @@ void CMapElement_Door::Describe_Entity()
GUI::Begin("PhysX");
if (GUI::CollapsingHeader("Door")) {
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
GUI::Text("m_vKinematicTimer %.3f", m_vKinematicTimer.x);
_float fCurrentDegree = XMConvertToDegrees(m_pJoint->getAngle());
GUI::Text("%.2f", fCurrentDegree);
GUI::Text("%.2f", m_pJoint->getVelocity());
if (GUI::CollapsingHeader("DOOR")) {
{
GUI::Text("Velo : %.2f", m_pJoint->getVelocity());
@@ -36,19 +36,11 @@ void CNPC_EleazarFig::Update(_float fTimeDelta)
#ifdef _DEBUG
Describe_Entity();
#endif // _DEBUG
{ // 세트
m_pCallBack_HitReport->BeginFrame();
m_pCharacter_Controller->Move(fTimeDelta);
m_pCallBack_HitReport->Set_CurrentSlop();
}
//m_pNPCInteraction->Set_Visible(0 < m_iEntered);
}
void CNPC_EleazarFig::Late_Update(_float fTimeDelta)
{
m_pTransformCom->Set_State(STATE::POSITION, m_pCharacter_Controller->Get_FootPosition());
m_pRigidBody->Set_Position(m_pTransformCom->Get_State(STATE::POSITION), true);
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
@@ -185,12 +177,9 @@ HRESULT CNPC_EleazarFig::Initialize(void* pArg)
_vector vPos = XMLoadFloat4(&pDesc->vPos);
m_pTransformCom->Set_State(STATE::POSITION, vPos);
m_pCharacter_Controller->Set_Position(vPos);
m_pTransformCom->Rotation(XMLoadFloat4(&pDesc->vRotQ));
m_pModelCom->Set_AnimationIndex(0, true);
m_pCallBack_Behavior->Initialize(m_pCharacter_Controller);
m_pCallBack_HitReport->Initialize(m_pCharacter_Controller);
return S_OK;
}
@@ -215,28 +204,6 @@ HRESULT CNPC_EleazarFig::Ready_Components(void* pArg)
reinterpret_cast<CComponent**>(&m_pModelCom)))) {
return E_FAIL;
}
{ // CCT
CCharacter_Controller::Character_Controller_DESC Desc{};
Desc.iSubKind = ENUM_CLASS(PXOBJECT::ELEAZARFIG);
Desc.pTransform = m_pTransformCom;
Desc.eBodyType = ACTOR::CAPSULE;
Desc.fContactOffset = 0.0001f;
Desc.fMaterial = { 1.2f, 1.0f, 0.0f };
Desc.bAutoStepping = { false };
Desc.fStepOffset = { 0.02f };
Desc.fRadius = 0.5f;
Desc.fHeight = 0.6f;
Desc.pCallback_HitReport = m_pCallBack_HitReport = CCallBack_NonPlayable_HitReport::Create();
Desc.pCallback_Behavior = m_pCallBack_Behavior = CCallBack_NonPlayable_Behavior::Create();
Desc.eClimbingMode = PSX::PxCapsuleClimbingMode::eEASY;
Desc.fWalkableSlope = 45.f;
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_CCT_CAPSULE"), (CComponent**)&m_pCharacter_Controller, &Desc))) {
return E_FAIL;
}
m_pCharacter_Controller->SetGravity(true);
}
{ // DO
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
Desc.iSubKind = ENUM_CLASS(PXOBJECT::ELEAZARFIG);
@@ -278,19 +245,10 @@ void CNPC_EleazarFig::Free()
__super::Free();
SAFE_RELEASE(m_pRigidBody);
SAFE_RELEASE(m_pCharacter_Controller);
if (nullptr != m_pInfoInstance) {
CInfoInstance* pInfo = m_pInfoInstance;
m_pInfoInstance = nullptr;
}
if (nullptr != m_pCallBack_Behavior) {
m_pCallBack_Behavior->Finalize();
}
if (nullptr != m_pCallBack_HitReport) {
m_pCallBack_HitReport->Finalize();
}
Safe_Delete(m_pCallBack_Behavior);
Safe_Delete(m_pCallBack_HitReport);
}
#ifdef _DEBUG
@@ -4,8 +4,6 @@
#include "GameInstance.h"
#include "InfoInstance.h"
#include "Player.h"
#include "CallBack_NonPlayable_Behavior.h"
#include "CallBack_NonPlayable_HitReport.h"
#include "NPCInteraction.h"
CNPC_Ollivander::CNPC_Ollivander(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
@@ -37,11 +35,6 @@ void CNPC_Ollivander::Update(_float fTimeDelta)
#ifdef _DEBUG
Describe_Entity();
#endif // _DEBUG
{ // 세트
m_pCallBack_HitReport->BeginFrame();
m_pCharacter_Controller->Move(fTimeDelta);
m_pCallBack_HitReport->Set_CurrentSlop();
}
m_pNPCInteraction->Set_Visible(0 < m_iEntered);
m_pRigidBody->Set_Position(m_pTransformCom->Get_State(STATE::POSITION), true);
@@ -49,8 +42,6 @@ void CNPC_Ollivander::Update(_float fTimeDelta)
void CNPC_Ollivander::Late_Update(_float fTimeDelta)
{
m_pTransformCom->Set_State(STATE::POSITION, m_pCharacter_Controller->Get_FootPosition());
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
Set_Shadow(m_pGameInstance->IsIn_ShadowViewFrustum(m_pTransformCom->Get_State(STATE::POSITION), m_pTransformCom->Get_Radius()));
@@ -188,12 +179,9 @@ HRESULT CNPC_Ollivander::Initialize(void* pArg)
_vector vPos = XMLoadFloat4(&pDesc->vPos);
m_pTransformCom->Set_State(STATE::POSITION, vPos);
m_pCharacter_Controller->Set_Position(vPos);
m_pTransformCom->Rotation(XMLoadFloat4(&pDesc->vRotQ));
m_pModelCom->Set_AnimationIndex(0, true);
m_pCallBack_Behavior->Initialize(m_pCharacter_Controller);
m_pCallBack_HitReport->Initialize(m_pCharacter_Controller);
return S_OK;
}
@@ -219,27 +207,6 @@ HRESULT CNPC_Ollivander::Ready_Components(void* pArg)
return E_FAIL;
}
{ // CCT
CCharacter_Controller::Character_Controller_DESC Desc{};
Desc.iSubKind = ENUM_CLASS(PXOBJECT::OLLIVANDER);
Desc.pTransform = m_pTransformCom;
Desc.eBodyType = ACTOR::CAPSULE;
Desc.fContactOffset = 0.0001f;
Desc.fMaterial = { 1.2f, 1.0f, 0.0f };
Desc.bAutoStepping = { false };
Desc.fStepOffset = { 0.02f };
Desc.fRadius = 0.2f;
Desc.fHeight = 0.3f;
Desc.pCallback_HitReport = m_pCallBack_HitReport = CCallBack_NonPlayable_HitReport::Create();
Desc.pCallback_Behavior = m_pCallBack_Behavior = CCallBack_NonPlayable_Behavior::Create();
Desc.eClimbingMode = PSX::PxCapsuleClimbingMode::eEASY;
Desc.fWalkableSlope = 45.f;
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_CCT_CAPSULE"), (CComponent**)&m_pCharacter_Controller, &Desc))) {
return E_FAIL;
}
m_pCharacter_Controller->SetGravity(true);
}
{ // DO
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
Desc.iSubKind = ENUM_CLASS(PXOBJECT::OLLIVANDER);
@@ -291,21 +258,12 @@ void CNPC_Ollivander::Free()
{
__super::Free();
SAFE_RELEASE(m_pCharacter_Controller);
SAFE_RELEASE(m_pNpcStat);
SAFE_RELEASE(m_pRigidBody);
if (nullptr != m_pInfoInstance) {
CInfoInstance* pInfo = m_pInfoInstance;
m_pInfoInstance = nullptr;
}
if (nullptr != m_pCallBack_Behavior) {
m_pCallBack_Behavior->Finalize();
}
if (nullptr != m_pCallBack_HitReport) {
m_pCallBack_HitReport->Finalize();
}
Safe_Delete(m_pCallBack_Behavior);
Safe_Delete(m_pCallBack_HitReport);
}
#ifdef _DEBUG
+1 -1
View File
@@ -111,7 +111,7 @@ HRESULT CPlayer::Initialize(void* pArg)
m_bAI = false;
XMLoadFloat4x4(m_pBroomModel->Get_BoneMatrixPtr("broomSocket"));
m_fRayDistance = 10.f;
m_fRayDistance = 60.f;
m_pModelCom->Set_DisableRootMotionScale(true);
return S_OK;
+42 -42
View File
@@ -193,6 +193,48 @@ HRESULT CPlayerRobe::Render_Legs()
return S_OK;
}
HRESULT CPlayerRobe::Render_BonePhysX()
{
_vector vColor = CMyTools::ColorRGB_A_HEXtoVECTOR(0x00ff00, 1.f);
_fmatrix OwnerMatrix = m_pParentTransformCom->Get_XMWorldMatrix();
_cmatrix ViewMatrix = m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW);
_matrix ProjMatrix = m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ);
ID3D11DepthStencilState* pPrevDSS = nullptr;
UINT iPrevStencilRef = 0;
m_pContext->OMGetDepthStencilState(&pPrevDSS, &iPrevStencilRef);
for (_uint iBoneIndex = 0; iBoneIndex < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++iBoneIndex)
{
_matrix WorldMatrix = XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr(PLAYER_JOINT_BONE_NAMES[iBoneIndex])) * OwnerMatrix;
m_pSubShape->Draw(WorldMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true,
[this]() {
m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0);
});
}
_matrix MainAnchorMatrix = /*XMMatrixRotationZ(XM_PIDIV2) * */XMLoadFloat4x4(m_pSocketMatrix) * OwnerMatrix;
m_pSubShape->Draw(MainAnchorMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true,
[this]() {
m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0);
});
m_pRobeMainAnchor->Render([this]() {
m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0);
});
Render_Legs();
_vector vRouteColor = CMyTools::ColorRGB_A_HEXtoVECTOR(0x0000ff, 1.f);
for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) {
m_pRobeJointAnchor[i]->Render([this]() {
m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0);
});
}
m_pContext->OMSetDepthStencilState(pPrevDSS, iPrevStencilRef);
if (pPrevDSS != nullptr) {
pPrevDSS->Release();
}
return S_OK;
}
#endif // _DEBUG
HRESULT CPlayerRobe::Update_RobeJoints()
{
for (_uint i = ENUM_CLASS(PLAYER_JOINT_ORDER::ORIGIN_TO_RUP_START); i < ENUM_CLASS(PLAYER_JOINT_ORDER::END); ++i) {
@@ -299,48 +341,6 @@ HRESULT CPlayerRobe::Update_RobeJoints()
}
return S_OK;
}
HRESULT CPlayerRobe::Render_BonePhysX()
{
_vector vColor = CMyTools::ColorRGB_A_HEXtoVECTOR(0x00ff00, 1.f);
_fmatrix OwnerMatrix = m_pParentTransformCom->Get_XMWorldMatrix();
_cmatrix ViewMatrix = m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW);
_matrix ProjMatrix = m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ);
ID3D11DepthStencilState* pPrevDSS = nullptr;
UINT iPrevStencilRef = 0;
m_pContext->OMGetDepthStencilState(&pPrevDSS, &iPrevStencilRef);
for (_uint iBoneIndex = 0; iBoneIndex < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++iBoneIndex)
{
_matrix WorldMatrix = XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr(PLAYER_JOINT_BONE_NAMES[iBoneIndex])) * OwnerMatrix;
m_pSubShape->Draw(WorldMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true,
[this]() {
m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0);
});
}
_matrix MainAnchorMatrix = /*XMMatrixRotationZ(XM_PIDIV2) * */XMLoadFloat4x4(m_pSocketMatrix) * OwnerMatrix;
m_pSubShape->Draw(MainAnchorMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true,
[this]() {
m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0);
});
m_pRobeMainAnchor->Render([this]() {
m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0);
});
Render_Legs();
_vector vRouteColor = CMyTools::ColorRGB_A_HEXtoVECTOR(0x0000ff, 1.f);
for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) {
m_pRobeJointAnchor[i]->Render([this]() {
m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0);
});
}
m_pContext->OMSetDepthStencilState(pPrevDSS, iPrevStencilRef);
if (pPrevDSS != nullptr) {
pPrevDSS->Release();
}
return S_OK;
}
#endif // _DEBUG
HRESULT CPlayerRobe::Ready_Components()
{
__super::Ready_Components(nullptr);
@@ -26,16 +26,13 @@ class CNPC_EleazarFig final : public CUnit
virtual void OnRayCollision(CGameObject* pCaster, _uint iCastedOrder, _float fDistance, _float3 vCastedWorldPos)override;
protected:
CInfoInstance* m_pInfoInstance = { nullptr };
CCharacter_Controller* m_pCharacter_Controller = { nullptr };
CRigidBody_Dynamic* m_pRigidBody = { nullptr };
class CCallBack_NonPlayable_Behavior* m_pCallBack_Behavior = { nullptr };
class CCallBack_NonPlayable_HitReport* m_pCallBack_HitReport = { nullptr };
CUnit* m_pPlayerAllyUnit = { nullptr };
_int m_iEntered = { 0 };
_float2 m_vEnteringTimer = { 0.f, 1.f };
_float m_fEncounterDistance = { 3.f };
_float m_fEncounterDistance = { 8.f };
protected:
virtual HRESULT Initialize_Prototype() override;
virtual HRESULT Initialize(void* pArg) override;
@@ -27,10 +27,7 @@ class CNPC_Ollivander final : public CUnit
virtual void OnRayCollision(CGameObject* pCaster, _uint iCastedOrder, _float fDistance, _float3 vCastedWorldPos)override;
protected:
CInfoInstance* m_pInfoInstance = { nullptr };
CCharacter_Controller* m_pCharacter_Controller = { nullptr };
CRigidBody_Dynamic* m_pRigidBody = { nullptr };
class CCallBack_NonPlayable_Behavior* m_pCallBack_Behavior = { nullptr };
class CCallBack_NonPlayable_HitReport* m_pCallBack_HitReport = { nullptr };
CUnit* m_pPlayerAllyUnit = { nullptr };
CNPC_Ollivander* m_pNPC_Ollivander = { nullptr };
@@ -39,7 +36,7 @@ class CNPC_Ollivander final : public CUnit
CNPCStat* m_pNpcStat = { nullptr };
_int m_iEntered = { 0 };
_float2 m_vEnteringTimer = { 0.f, 1.f };
_float m_fEncounterDistance = { 3.f };
_float m_fEncounterDistance = { 8.f };
protected:
virtual HRESULT Initialize_Prototype() override;
virtual HRESULT Initialize(void* pArg) override;
+1 -1
View File
@@ -73,11 +73,11 @@ class CPlayerRobe final : public CPartObject
HRESULT Bind_ShaderResources() { return S_OK; }
HRESULT Update_LegsPosition();
HRESULT Update_RobeJoints();
HRESULT Helper_RouteJointGenerater(CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC& Desc_Body, ROUTE_DESC& Desc_Route, _matrix* xmAnchorMatricesWorld);
#ifdef _DEBUG
HRESULT Render_BonePhysX();
HRESULT Render_Legs();
HRESULT Update_RobeJoints();
#endif // _DEBUG
public:
static CPlayerRobe* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
@@ -70,14 +70,15 @@ float2 Get_MovedUV(float2 vOriginalUV, float fDeltaU, float fDeltaV, uint iIndex
float2 vOffset = float2(iIndexU * fDeltaU, iIndexV * fDeltaV);
return vOriginalUV * vDelta + vOffset;
}
float2 UV_Cutting(float2 vUV, float2 vUVCutting, int iCurrentFrame)
float2 UV_Cutting(float2 vUV, float2 vUVCutting, uint iCurrentFrame)
{
float2 UV = vUV; // 이미지의 UV값
int iTotalFrame = vUVCutting.x * vUVCutting.y; // 이미지의 최대 프레임 (몇 곱하기 몇인지)
uint iTotalFrame = vUVCutting.x * vUVCutting.y; // 이미지의 최대 프레임 (몇 곱하기 몇인지)
int iFrameX = iCurrentFrame % (int) vUVCutting.x; // 현재 x축의 위치(현재 이미지의 몇번째 칸을 보여줄 지)
int iFrameY = iCurrentFrame / (int) vUVCutting.x; // 현재 y축의 위치(현재 이미지의 몇번째 줄을 보여줄 지)
uint iFrameX = iCurrentFrame % (uint) vUVCutting.x; // 현재 x축의 위치(현재 이미지의 몇번째 칸을 보여줄 지)
uint iFrameY = iCurrentFrame / (uint) vUVCutting.x; // 현재 y축의 위치(현재 이미지의 몇번째 줄을 보여줄 지)
float fFreamWidth = 1.0 / vUVCutting.x; // 1.0 나누기 이미지 갯수를 해서 한칸에 얼마나 갈지 정해준다.
float fFreamHeight = 1.0 / vUVCutting.y; // 1.0 나누기 이미지 갯수를 해서 한줄에 얼마나 갈지 정해준다.
@@ -174,7 +174,7 @@ PS_OUT PS_Logo_Text(PS_IN In)
Color.rgb = (Color.rgb - 0.5f) * 1.2f + 0.5f;
Color.rgb = pow(Color.rgb, 1.25f);
Color.rgb = pow(clamp(Color.rgb, 0.f, 1.f), 1.25f);
float luminance = dot(Color.rgb, float3(0.299f, 0.587f, 0.114f));
float light = smoothstep(0.7f, 0.92f, luminance);
@@ -541,7 +541,7 @@ float4 DrawEffect(PS_IN In)
{
float2 UV; // 이미지의 UV값
UV = UV_Cutting(In.vTexcoord, g_vUVCutting, int(fAnimIndex));
UV = UV_Cutting(In.vTexcoord, g_vUVCutting, uint(fAnimIndex));
if (g_isDiffuseUVMove)
{
@@ -602,7 +602,7 @@ float4 DrawEffect(PS_IN In)
if (length(vNoiseCut) < FLT_EPSILON3)
vNoiseCut = float2(1.f, 1.f);
float2 vNoiseUV = UV_Cutting(In.vTexcoord, vNoiseCut, int(fAnimIndex));
float2 vNoiseUV = UV_Cutting(In.vTexcoord, vNoiseCut, uint(fAnimIndex));
if (g_isNoiseUVMove == true)
vNoiseUV = In.vTexcoord + SelectLerpUV(g_vNoiseUVGainAmount, (vNoiseUVMoveTime.x / vNoiseUVMoveTime.y), g_iNoiseMoveLerpOption);
@@ -647,7 +647,7 @@ float4 DrawEffect(PS_IN In)
{
float2 vMaskTexcoord = In.vTexcoord;
vMaskTexcoord = UV_Cutting(In.vTexcoord, g_vUVMaskCutting, int(fAnimIndex));
vMaskTexcoord = UV_Cutting(In.vTexcoord, g_vUVMaskCutting, uint(fAnimIndex));
vMaskTexcoord += g_vMaskOffset;
// 마스크 디스토션
@@ -789,7 +789,7 @@ float4 DrawEffect(PS_IN In)
if (g_isNoDissolveSmoothStep == true)
{
fFade = smoothstep(fTimeRatio, fTimeRatio, vMtrlDissolve.r);
fFade = smoothstep(fTimeRatio, fTimeRatio + FLT_EPSILON7, vMtrlDissolve.r);
}
vMtrlDiffuse.a *= fFade;
@@ -184,10 +184,19 @@ HRESULT CLoader::Loading_For_ObjectViewer()
));
futures.emplace_back(Deferred_ModelLoad(
MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/VictorRookWood/VictorRookWood.bin", XMMatrixIdentity(),
TEXT("Prototype_Component_VictorRookWood_Model")
MODEL::ANIM, "../Bin/Resources/Models/Object/Camera/Camera.bin", XMMatrixIdentity(),
TEXT("Prototype_Component_Camera_Model")
));
//futures.emplace_back(Deferred_ModelLoad(
// MODEL::ANIM, "../Bin/Resources/Models/Object/Camera/Camera_Spell.fbx", XMMatrixIdentity(),
// TEXT("Prototype_Component_Camera_DSModel")
//));
//futures.emplace_back(Deferred_ModelLoad(
// MODEL::ANIM, "../Bin/Resources/Models/Object/Camera/Camera_BossFight.fbx", XMMatrixIdentity(),
// TEXT("Prototype_Component_Camera_DSModel")
//));
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_CCL_CameraRig.001_Model"),
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Camera/CCL_CameraRig.001.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
@@ -70,14 +70,15 @@ float2 Get_MovedUV(float2 vOriginalUV, float fDeltaU, float fDeltaV, uint iIndex
float2 vOffset = float2(iIndexU * fDeltaU, iIndexV * fDeltaV);
return vOriginalUV * vDelta + vOffset;
}
float2 UV_Cutting(float2 vUV, float2 vUVCutting, int iCurrentFrame)
float2 UV_Cutting(float2 vUV, float2 vUVCutting, uint iCurrentFrame)
{
float2 UV = vUV; // 이미지의 UV값
int iTotalFrame = vUVCutting.x * vUVCutting.y; // 이미지의 최대 프레임 (몇 곱하기 몇인지)
uint iTotalFrame = vUVCutting.x * vUVCutting.y; // 이미지의 최대 프레임 (몇 곱하기 몇인지)
int iFrameX = iCurrentFrame % (int) vUVCutting.x; // 현재 x축의 위치(현재 이미지의 몇번째 칸을 보여줄 지)
int iFrameY = iCurrentFrame / (int) vUVCutting.x; // 현재 y축의 위치(현재 이미지의 몇번째 줄을 보여줄 지)
uint iFrameX = iCurrentFrame % (uint) vUVCutting.x; // 현재 x축의 위치(현재 이미지의 몇번째 칸을 보여줄 지)
uint iFrameY = iCurrentFrame / (uint) vUVCutting.x; // 현재 y축의 위치(현재 이미지의 몇번째 줄을 보여줄 지)
float fFreamWidth = 1.0 / vUVCutting.x; // 1.0 나누기 이미지 갯수를 해서 한칸에 얼마나 갈지 정해준다.
float fFreamHeight = 1.0 / vUVCutting.y; // 1.0 나누기 이미지 갯수를 해서 한줄에 얼마나 갈지 정해준다.
@@ -225,7 +225,10 @@ void CMotion_Trail::Free()
SAFE_RELEASE(m_pClearBuffer);
}
}
#ifdef _DEBUG
void CMotion_Trail::Describe_Entity()
{
}
#endif // _DEBUG
+3 -1
View File
@@ -27,7 +27,7 @@ class ENGINE_DLL CMotion_Trail final : public CComponent
private:
CMotion_Trail(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
CMotion_Trail(const CMotion_Trail& rhs);
virtual ~CMotion_Trail() = default;
virtual ~CMotion_Trail() = default;
public:
HRESULT Update_Capture(_float fDeltaTime); // 카피리소스 씀. 절대로 dispatch 전에 호출할 것
@@ -56,7 +56,9 @@ class ENGINE_DLL CMotion_Trail final : public CComponent
virtual CMotion_Trail* Clone(void* pArg, class CGameObject* pOwner = nullptr) override;
virtual void Free() override;
#ifdef _DEBUG
void Describe_Entity() override;
#endif // _DEBUG
};
NS_END
+1
View File
@@ -61,6 +61,7 @@ Global
{F91AD988-A0C8-4169-AA7D-A7596A403CFF}.Debug|x86.ActiveCfg = Debug|Win32
{F91AD988-A0C8-4169-AA7D-A7596A403CFF}.Debug|x86.Build.0 = Debug|Win32
{F91AD988-A0C8-4169-AA7D-A7596A403CFF}.Release|x64.ActiveCfg = Release|x64
{F91AD988-A0C8-4169-AA7D-A7596A403CFF}.Release|x64.Build.0 = Release|x64
{F91AD988-A0C8-4169-AA7D-A7596A403CFF}.Release|x86.ActiveCfg = Release|Win32
{F91AD988-A0C8-4169-AA7D-A7596A403CFF}.Release|x86.Build.0 = Release|Win32
{2133313A-E5E1-41CD-B976-21753FBCD083}.Debug|x64.ActiveCfg = Debug|x64