[fix] RanrokCutScene
[add] Prop Move
This commit is contained in:
@@ -125,7 +125,7 @@ HRESULT CLevel_GamePlay::Initialize(void* pArg)
|
||||
_bool bLoadNPC = { true };
|
||||
#ifdef _DEBUG
|
||||
#ifdef 기무리
|
||||
bLoadNPC = true;
|
||||
bLoadNPC = false;
|
||||
#endif
|
||||
#endif // _DEBUG
|
||||
if (true == bLoadNPC) {
|
||||
@@ -360,8 +360,8 @@ HRESULT CLevel_GamePlay::Ready_Background()
|
||||
#endif //
|
||||
#ifdef 기무리
|
||||
isReady_Background = true;
|
||||
isReady_Hogsmeade = true;
|
||||
isReady_Hogwart = true;
|
||||
isReady_Hogsmeade = false;
|
||||
isReady_Hogwart = false;
|
||||
#endif //
|
||||
#ifdef 나
|
||||
isReady_Background = false;
|
||||
@@ -1034,7 +1034,7 @@ HRESULT CLevel_GamePlay::Ready_Layer_Monster()
|
||||
isLoad_Monster = true;
|
||||
#endif //
|
||||
#ifdef 기무리
|
||||
isLoad_Monster = true;
|
||||
isLoad_Monster = false;
|
||||
#endif //
|
||||
#ifdef 나
|
||||
isLoad_Monster = true;
|
||||
@@ -1147,8 +1147,8 @@ HRESULT CLevel_GamePlay::Ready_Layer_Npc()
|
||||
isLoad_NPC = false;
|
||||
#endif //
|
||||
#ifdef 기무리
|
||||
isLoad_NPC = true;
|
||||
isLoad_RandomNPC = true;
|
||||
isLoad_NPC = false;
|
||||
isLoad_RandomNPC = false;
|
||||
#endif //
|
||||
#ifdef 나
|
||||
isLoad_RandomNPC = true;
|
||||
|
||||
@@ -549,8 +549,8 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
#endif //
|
||||
#ifdef 기무리
|
||||
isLoad_Background = true;
|
||||
isLoad_Hogwart = true;
|
||||
isLoad_UI_SEQUANTIAL = true;
|
||||
isLoad_Hogwart = false;
|
||||
isLoad_UI_SEQUANTIAL = false;
|
||||
isLoad_NPC = true;
|
||||
isLoad_Monster = true;
|
||||
#endif //
|
||||
|
||||
@@ -257,8 +257,8 @@ HRESULT CPlayer::Render()
|
||||
#ifdef _DEBUG
|
||||
#ifdef 기무리
|
||||
//Render_CameraCoordinateSystem();
|
||||
m_pCharacter_Controller->Render();
|
||||
#endif // 기무리
|
||||
//m_pCharacter_Controller->Render();
|
||||
#endif // _DEBUG
|
||||
|
||||
}
|
||||
|
||||
@@ -62,10 +62,8 @@ HRESULT CRanrok_Prop::Initialize(void* pArg)
|
||||
|
||||
m_pInfoInstance->Regist_ActiveEffect(this);
|
||||
#ifdef _DEBUG
|
||||
|
||||
m_pSubShape = (GeometricPrimitive::CreateSphere(m_pContext, 1.f, 12, false, false));
|
||||
m_Batch = make_unique<PrimitiveBatch<VertexPositionColor>>(m_pContext);
|
||||
|
||||
#endif // _DEBUG
|
||||
return S_OK;
|
||||
}
|
||||
@@ -83,7 +81,7 @@ void CRanrok_Prop::Update(_float fTimeDelta)
|
||||
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
|
||||
m_pRigidBody->Set_Position(m_pTransformCom->Get_State(STATE::POSITION), true);
|
||||
Update_Event(fTimeDelta);
|
||||
|
||||
|
||||
@@ -135,15 +133,16 @@ HRESULT CRanrok_Prop::Render()
|
||||
{
|
||||
if (RENDER::NONLIGHT == m_pGameInstance->Get_CurrentRenderPass()) {
|
||||
#ifdef _DEBUG
|
||||
m_pRigidBody->Render();
|
||||
m_Batch->Begin();
|
||||
|
||||
_matrix ViewMatrix = m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW);
|
||||
_matrix ProjMatrix = m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ);
|
||||
_vector vColor = CMyTools::ColorRGB_A_HEXtoVECTOR(0xff0f0f, 1.f);
|
||||
m_pSubShape->Draw(m_pTransformCom->Get_XMWorldMatrix(), ViewMatrix, ProjMatrix, vColor, nullptr, true);
|
||||
_matrix WorldMatrix = XMMatrixScaling(m_pRigidBody->Get_HalfGeometryInfo().x, m_pRigidBody->Get_HalfGeometryInfo().x, m_pRigidBody->Get_HalfGeometryInfo().x) * m_pTransformCom->Get_XMWorldMatrix();
|
||||
m_pSubShape->Draw(WorldMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true);
|
||||
|
||||
m_Batch->End();
|
||||
m_bRender = false;
|
||||
#endif // _DEBUG
|
||||
}
|
||||
return S_OK;
|
||||
|
||||
@@ -62,7 +62,7 @@ HRESULT CTriggerBox::Initialize(TRIGGERBOX_DESC* pDesc)
|
||||
m_Batch = make_unique<PrimitiveBatch<VertexPositionColor>>(m_pContext);
|
||||
|
||||
#endif // _DEBUG
|
||||
_float3 vScale = { Desc.fRadius, Desc.fRadius, Desc.fRadius };
|
||||
_float3 vScale = { Desc.fRadius * 2.f, Desc.fRadius * 2.f, Desc.fRadius * 2.f };
|
||||
m_pTransformCom->Set_Scale(vScale);
|
||||
m_vScanTimer.y += m_pGameInstance->Real_Random_Float(0.f, 0.2f);
|
||||
|
||||
@@ -73,19 +73,20 @@ HRESULT CTriggerBox::Scan()
|
||||
{
|
||||
_float fRadius = m_pTransformCom->Get_Radius();
|
||||
|
||||
PSX::PxSweepBufferN<32> pxBuffer = {};
|
||||
_bool bHit = m_pGameInstance->SphereCast(fRadius, m_pTransformCom->Get_State(STATE::POSITION), XMVectorSet(0.f, 1.f, 0.f, 0.f), 1.1f,
|
||||
PSX::PxHitFlag::eDEFAULT, PSX::PxQueryFlag::eDYNAMIC, pxBuffer);
|
||||
PSX::PxOverlapBufferN<32> pxBuffer = {};
|
||||
_bool bHit = m_pGameInstance->Overlap(fRadius, m_pTransformCom->Get_State(STATE::POSITION),
|
||||
PSX::PxQueryFlag::eDYNAMIC | PSX::PxQueryFlag::eNO_BLOCK, pxBuffer);
|
||||
|
||||
const PSX::PxSweepHit & hit = pxBuffer.block;
|
||||
|
||||
PSX::PxOverlapHit & hit = pxBuffer.block;
|
||||
PSX::PxRigidActor* pActor = hit.actor;
|
||||
_uint iHitCount = pxBuffer.getNbAnyHits();
|
||||
_uint iHitCount = pxBuffer.getNbTouches();
|
||||
HRESULT hr = E_FAIL;
|
||||
if (bHit) {
|
||||
hr = CheckPlayerHit(pActor);
|
||||
if (FAILED(hr)) {
|
||||
for (_uint i = 0; i < iHitCount; ++i) {
|
||||
PSX::PxSweepHit* pHit = &pxBuffer.touches[i];
|
||||
PSX::PxOverlapHit* pHit = &pxBuffer.touches[i];
|
||||
hr = CheckPlayerHit(pHit->actor);
|
||||
if (SUCCEEDED(hr)) {
|
||||
break;
|
||||
|
||||
@@ -375,9 +375,17 @@ HRESULT CCharacter_Controller::Initialize(void* pArg)
|
||||
|
||||
PSX::PxRigidDynamic* pActor = m_pController->getActor();
|
||||
pActor->userData = &m_tagData;
|
||||
PSX::PxShape* shapes[8]{};
|
||||
PSX::PxU32 count = pActor->getShapes(shapes, 8);
|
||||
for (PSX::PxU32 i = 0; i < count; ++i)
|
||||
{
|
||||
shapes[i]->userData = &m_tagData;
|
||||
shapes[i]->setFlag(PSX::PxShapeFlag::eSCENE_QUERY_SHAPE, true);
|
||||
}
|
||||
m_pGameInstance->ApplyFilterData(pActor);
|
||||
m_pController->setStepOffset(pDesc->fStepOffset);
|
||||
|
||||
|
||||
if (nullptr == m_pController) {
|
||||
assert(false);
|
||||
return E_FAIL;
|
||||
|
||||
@@ -1098,6 +1098,10 @@ _bool CGameInstance::SphereCast(_float fRadius, _fvector vStartPos, _gvector vDi
|
||||
{
|
||||
return m_pPhysX_Manager->SphereCast(fRadius, vStartPos, vDir, fDistance, flagHitsData, flagQuery, hitBuffer);
|
||||
}
|
||||
_bool CGameInstance::Overlap(_float fRadius, _fvector vCenter, PSX::PxQueryFlags queryFlags, PSX::PxOverlapCallback& overlapBuffer, PSX::PxQueryFilterCallback* filterCallback)
|
||||
{
|
||||
return m_pPhysX_Manager->Overlap(fRadius, vCenter, queryFlags, overlapBuffer, filterCallback);
|
||||
}
|
||||
_bool CGameInstance::RayCast(_float3 _vStartPos, _float3 _vDir, _float fDistance, PSX::PxRaycastHit* pRayHitArray, _uint iMaxHitCapacity, _uint& iOutHitCount)
|
||||
{
|
||||
return m_pPhysX_Manager->RayCast(_vStartPos, _vDir, fDistance, pRayHitArray, iMaxHitCapacity, iOutHitCount);
|
||||
|
||||
@@ -347,6 +347,24 @@ _bool CPhysX_Manager::SphereCast(_float fRadius, _fvector _vStartPos, _gvector _
|
||||
return bHit;
|
||||
}
|
||||
|
||||
_bool CPhysX_Manager::Overlap(_float fRadius, _fvector vCenter, PSX::PxQueryFlags queryFlags, PSX::PxOverlapCallback& overlapBuffer, PSX::PxQueryFilterCallback* filterCallback)
|
||||
{
|
||||
const PSX::PxSphereGeometry sphereGeometry(fRadius);
|
||||
PSX::PxVec3 pxCenter = {};
|
||||
XMStoreFloat3((_float3*)&pxCenter, vCenter);
|
||||
const PSX::PxTransform spherePose(pxCenter);
|
||||
|
||||
PSX::PxQueryFilterData filterData;
|
||||
filterData.flags = queryFlags;
|
||||
|
||||
if (filterCallback != nullptr)
|
||||
filterData.flags |= PSX::PxQueryFlag::ePREFILTER;
|
||||
|
||||
_bool hit = m_pScene->overlap( sphereGeometry, spherePose, overlapBuffer, filterData, filterCallback );
|
||||
|
||||
return hit ? true : false;
|
||||
}
|
||||
|
||||
_bool CPhysX_Manager::RayCast(_float3 _vStartPos, _float3 _vDir, _float fDistance, PSX::PxRaycastHit* pRayHitArray, _uint iMaxHitCapacity, _uint& iOutHitCount)
|
||||
{
|
||||
return RayCast(XMLoadFloat3(&_vStartPos), XMLoadFloat3(&_vDir), fDistance, pRayHitArray, iMaxHitCapacity, iOutHitCount);
|
||||
@@ -680,7 +698,7 @@ void CPhysX_Manager::ApplyFilterData(PSX::PxRigidActor* pRigidActor)
|
||||
|
||||
PSX::PxFilterData DATAfilter = {};
|
||||
DATAfilter.word0 = CategoryBit; // 나는 누구인가
|
||||
DATAfilter.word1 = MaskBits; // 누구와 부딪힐 것인가
|
||||
DATAfilter.word1 = MaskBits; // 누구와 상호작용(충돌/쿼리)할 것인가
|
||||
|
||||
const PSX::PxU32 shapeCount = pRigidActor->getNbShapes();
|
||||
vector<PSX::PxShape*> shapes(shapeCount);
|
||||
@@ -688,8 +706,18 @@ void CPhysX_Manager::ApplyFilterData(PSX::PxRigidActor* pRigidActor)
|
||||
|
||||
for (PSX::PxShape* shape : shapes)
|
||||
{
|
||||
if (!shape) continue;
|
||||
|
||||
// 시뮬레이션 필터
|
||||
shape->setSimulationFilterData(DATAfilter);
|
||||
|
||||
// 씬쿼리(Overlap/Sweep/Raycast) 필터
|
||||
shape->setQueryFilterData(DATAfilter);
|
||||
|
||||
// 씬쿼리 대상 플래그 보장
|
||||
shape->setFlag(PSX::PxShapeFlag::eSCENE_QUERY_SHAPE, true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
PSX::PxFilterFlags CPhysX_Manager::SimulationFilterShader(PSX::PxFilterObjectAttributes pxAttributes0, PSX::PxFilterData pxFilterData0, PSX::PxFilterObjectAttributes pxAttributes1, PSX::PxFilterData pxFilterData1, PSX::PxPairFlags& pxPairFlags, const void* pConstantBlock, PSX::PxU32 iConstantBlockSize)
|
||||
|
||||
@@ -208,6 +208,17 @@ void CRigidBody_Dynamic::Detach_Actor(_uint iLevel)
|
||||
m_bActive = false;
|
||||
}
|
||||
|
||||
void CRigidBody_Dynamic::SetActive(_bool bCondition)
|
||||
{
|
||||
m_bActive = bCondition;
|
||||
if (true == m_bActive) {
|
||||
m_pGameInstance->Attach_Actor(*m_pRigidBody, m_pGameInstance->Get_NextLevelID());
|
||||
}
|
||||
else {
|
||||
m_pGameInstance->Detach_Actor(*m_pRigidBody, m_pGameInstance->Get_NextLevelID());
|
||||
}
|
||||
}
|
||||
|
||||
_vector CRigidBody_Dynamic::Get_Position()
|
||||
{
|
||||
PSX::PxVec3 pxPos = m_pRigidBody->getGlobalPose().p;
|
||||
|
||||
@@ -227,6 +227,7 @@ class ENGINE_DLL CGameInstance final : public CBase
|
||||
|
||||
_bool SphereCast(_float fRadius, _float3 vStartPos, _float3 vDir, _float fDistance, PSX::PxHitFlags flagHitsData, PSX::PxQueryFlags flagQuery, PSX::PxSweepBuffer& hitBuffer);
|
||||
_bool SphereCast(_float fRadius, _fvector vStartPos, _gvector vDir, _float fDistance, PSX::PxHitFlags flagHitsData, PSX::PxQueryFlags flagQuery, PSX::PxSweepBuffer& hitBuffer);
|
||||
_bool Overlap(_float fRadius, _fvector vCenter, PSX::PxQueryFlags queryFlags, PSX::PxOverlapCallback& overlapBuffer, PSX::PxQueryFilterCallback* filterCallback = nullptr);
|
||||
_bool RayCast(_float3 _vStartPos, _float3 _vDir, _float fDistance, PSX::PxRaycastHit* pRayHitArray, _uint iMaxHitCapacity, _uint& iOutHitCount);
|
||||
_bool RayCast(_fvector _vStartPos, _gvector _vDir, _float fDistance, PSX::PxRaycastHit* pRayHitArray, _uint iMaxHitCapacity, _uint& iOutHitCount);
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ class CPhysX_Manager final : public CBase
|
||||
|
||||
_bool SphereCast(_float fRadius, _float3 vStartPos, _float3 vDir, _float fDistance, PSX::PxHitFlags flagHitsData, PSX::PxQueryFlags flagQuery, PSX::PxSweepBuffer& hitBuffer);
|
||||
_bool SphereCast(_float fRadius, _fvector vStartPos, _gvector vDir, _float fDistance, PSX::PxHitFlags flagHitsData, PSX::PxQueryFlags flagQuery, PSX::PxSweepBuffer& hitBuffer);
|
||||
// _bool Overlap(_float fRadius, _fvector vStartPos, PSX::PxHitFlags flagHitsData, PSX::PxQueryFlags flagQuery, PSX::PxSweepBuffer& hitBuffer);
|
||||
_bool Overlap(_float fRadius, _fvector vCenter, PSX::PxQueryFlags queryFlags, PSX::PxOverlapCallback& overlapBuffer, PSX::PxQueryFilterCallback* filterCallback = nullptr);
|
||||
_bool RayCast(_float3 _vStartPos, _float3 _vDir, _float fDistance, PSX::PxRaycastHit* pRayHitArray, _uint iMaxHitCapacity, _uint& iOutHitCount);
|
||||
_bool RayCast(_fvector _vStartPos, _fvector _vDir, _float fDistance, PSX::PxRaycastHit* pRayHitArray, _uint iMaxHitCapacity, _uint& iOutHitCount);
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ class ENGINE_DLL CRigidBody_Dynamic : public CRigidBody
|
||||
HRESULT ConvertToCCT(class CCharacter_Controller& CCTOriginal);
|
||||
void Detach_Actor(_uint iLevel);
|
||||
_bool IsActive() const { return m_bActive; }
|
||||
void SetActive(_bool bCondition) { m_bActive = bCondition; }
|
||||
void SetActive(_bool bCondition);
|
||||
|
||||
_vector Get_Position();
|
||||
void Set_Position(_vector vPos, _bool bTeleport);
|
||||
|
||||
Reference in New Issue
Block a user