[add] CCT Adjust
This commit is contained in:
@@ -110,7 +110,6 @@ void CPlayer::Update(_float fTimeDelta)
|
|||||||
|
|
||||||
m_pFSM->Update_State(fTimeDelta);
|
m_pFSM->Update_State(fTimeDelta);
|
||||||
|
|
||||||
|
|
||||||
m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
|
m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
|
||||||
|
|
||||||
|
|
||||||
@@ -127,7 +126,7 @@ void CPlayer::Update(_float fTimeDelta)
|
|||||||
|
|
||||||
void CPlayer::Late_Update(_float fTimeDelta)
|
void CPlayer::Late_Update(_float fTimeDelta)
|
||||||
{
|
{
|
||||||
m_pTransformCom->Set_State(STATE::POSITION, m_pCharacter_Controller->Get_Position());
|
m_pTransformCom->Set_State(STATE::POSITION, m_pCharacter_Controller->Get_FootPosition());
|
||||||
|
|
||||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||||
|
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ void CCharacter_Controller::Move(_float fTimeDelta)
|
|||||||
const PSX::PxObstacleContext* pPxObstacles = { nullptr }; // 캐릭터가 충돌해야할 추가적인 장애물 객체?, 닿은 장애물은 캐시된다?
|
const PSX::PxObstacleContext* pPxObstacles = { nullptr }; // 캐릭터가 충돌해야할 추가적인 장애물 객체?, 닿은 장애물은 캐시된다?
|
||||||
|
|
||||||
if (true == m_bGravity) {
|
if (true == m_bGravity) {
|
||||||
m_pTransform->AccumulateMomentum(XMVectorSet(0.f, -GRAVITY * fTimeDelta, 0.f, 0.f));
|
m_pTransform->AccumulateMomentum(XMVectorSet(0.f, -3.5f * fTimeDelta, 0.f, 0.f));
|
||||||
}
|
}
|
||||||
XMStoreFloat3((_float3*)&pxVecMomentum, m_pTransform->Get_CurrentMomentum());
|
XMStoreFloat3((_float3*)&pxVecMomentum, m_pTransform->Get_CurrentMomentum());
|
||||||
|
|
||||||
@@ -182,10 +182,10 @@ _vector CCharacter_Controller::Get_Position()
|
|||||||
return XMVectorSet((_float)pxVPos.x, (_float)pxVPos.y, (_float)pxVPos.z, 1.f);
|
return XMVectorSet((_float)pxVPos.x, (_float)pxVPos.y, (_float)pxVPos.z, 1.f);
|
||||||
}
|
}
|
||||||
|
|
||||||
_float3 CCharacter_Controller::Get_FootPosition()
|
_vector CCharacter_Controller::Get_FootPosition()
|
||||||
{
|
{
|
||||||
PSX::PxExtendedVec3 pxLVecfootPos = m_pController->getFootPosition();
|
PSX::PxExtendedVec3 pxLVecfootPos = m_pController->getFootPosition();
|
||||||
return { (_float)pxLVecfootPos.x, (_float)pxLVecfootPos.y, (_float)pxLVecfootPos.z };
|
return XMVectorSet((_float)pxLVecfootPos.x, (_float)pxLVecfootPos.y, (_float)pxLVecfootPos.z, 1.f );
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT CCharacter_Controller::Initialize_Prototype()
|
HRESULT CCharacter_Controller::Initialize_Prototype()
|
||||||
@@ -372,7 +372,7 @@ void CCharacter_Controller::Describe_Entity()
|
|||||||
GUIHelpMarker("A capsule is affected by its lower sphere and tends to generate an up vector on steps.\nIn eEASY, the up vector is combined with the step offset, allowing easier climbing; in eCONSTRAINED, the up vector is removed during step detection and only the step offset is used.");
|
GUIHelpMarker("A capsule is affected by its lower sphere and tends to generate an up vector on steps.\nIn eEASY, the up vector is combined with the step offset, allowing easier climbing; in eCONSTRAINED, the up vector is removed during step detection and only the step offset is used.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
GUI::Text("%.1f", cosf(m_fSlopeLimit)); GUI::SameLine(); GUI::SliderFloat("m_fSlopeLimit", &m_fSlopeLimit, 0.0f, 1.f);
|
||||||
if (GUI::SliderFloat3("Volume", (_float*)&vVolume, 0.1f, 10.f, "%.2f")) {
|
if (GUI::SliderFloat3("Volume", (_float*)&vVolume, 0.1f, 10.f, "%.2f")) {
|
||||||
Modify_Volume(vVolume);
|
Modify_Volume(vVolume);
|
||||||
}GUIHelpMarker("Box uses vSize; Capsule uses x->fRadius, y->fHeight.\nThe capsule's fHeight is likely the distance from the lower sphere center to the upper sphere center.");
|
}GUIHelpMarker("Box uses vSize; Capsule uses x->fRadius, y->fHeight.\nThe capsule's fHeight is likely the distance from the lower sphere center to the upper sphere center.");
|
||||||
|
|||||||
@@ -133,7 +133,6 @@ PSX::PxRigidStatic* CPhysX_Manager::Add_StaticActor(CRigidBody_Static& RigidBody
|
|||||||
m_HeightFieldGeometry.emplace(RigidBody.Get_PxMeshKey(), pPxHeightGeometry);
|
m_HeightFieldGeometry.emplace(RigidBody.Get_PxMeshKey(), pPxHeightGeometry);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
assert(false);
|
assert(false);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -396,12 +396,13 @@ void CVIBuffer_Terrain::ConvertToHeightField(const _tchar* pStaticKey)
|
|||||||
|
|
||||||
for (_uint iRow = 0; iRow < m_iNumVerticesZ; ++iRow) {
|
for (_uint iRow = 0; iRow < m_iNumVerticesZ; ++iRow) {
|
||||||
for (_uint iCol = 0; iCol < m_iNumVerticesX; ++iCol) {
|
for (_uint iCol = 0; iCol < m_iNumVerticesX; ++iCol) {
|
||||||
_uint iIndex = iRow * m_iNumVerticesZ + iCol;
|
_uint iIndex = iRow * m_iNumVerticesX + iCol;
|
||||||
|
_uint iPhysXIndex = iCol * m_iNumVerticesZ + iRow;
|
||||||
|
|
||||||
_float fRealHeight = m_HeigthValues[iIndex];
|
_float fRealHeight = m_HeigthValues[iIndex];
|
||||||
PSX::PxI16 iClampHeight = (PSX::PxI16)(PSX::PxClamp(fRealHeight, -32767.f, 32767.f));
|
PSX::PxI16 iClampHeight = (PSX::PxI16)(PSX::PxClamp(fRealHeight, -32767.f, 32767.f));
|
||||||
|
|
||||||
PSX::PxHeightFieldSample& pxSample = pxSamples[iIndex];
|
PSX::PxHeightFieldSample& pxSample = pxSamples[iPhysXIndex];
|
||||||
|
|
||||||
pxSample.height = iClampHeight;
|
pxSample.height = iClampHeight;
|
||||||
pxSample.materialIndex0 = pxSample.materialIndex1 = 0;
|
pxSample.materialIndex0 = pxSample.materialIndex1 = 0;
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ class ENGINE_DLL CCharacter_Controller final :
|
|||||||
void Move(_float fTimeDelta); // 이동 // 충돌보정만 있음,
|
void Move(_float fTimeDelta); // 이동 // 충돌보정만 있음,
|
||||||
void Set_Position(_fvector vNewPos); // 순간이동
|
void Set_Position(_fvector vNewPos); // 순간이동
|
||||||
_vector Get_Position();
|
_vector Get_Position();
|
||||||
_float3 Get_FootPosition(); // ContactOffset이 고려된 발바닥 위치( 실제보다 바닥 위치가 더 아래에 위치한다는 뜻 )
|
_vector Get_FootPosition(); // ContactOffset이 고려된 발바닥 위치( 실제보다 바닥 위치가 더 아래에 위치한다는 뜻 )
|
||||||
|
|
||||||
void Resize_Volume(_float fHeight); // 높이를 수정하고 바닥에 붙임
|
void Resize_Volume(_float fHeight); // 높이를 수정하고 바닥에 붙임
|
||||||
void Modify_Volume(_float3 fVolume);
|
void Modify_Volume(_float3 fVolume);
|
||||||
@@ -71,7 +71,7 @@ class ENGINE_DLL CCharacter_Controller final :
|
|||||||
PSX::PxController* m_pController = { nullptr };
|
PSX::PxController* m_pController = { nullptr };
|
||||||
CTransform* m_pTransform = { nullptr };
|
CTransform* m_pTransform = { nullptr };
|
||||||
_bool m_bAutoStepping = { false };
|
_bool m_bAutoStepping = { false };
|
||||||
_float m_fSlopeLimit = { 0.f }; // cosf각도, 오르막 경사각 제한. ( 추가설정 필요함 )
|
_float m_fSlopeLimit = { 0.5f/*0~1*/}; // cosf각도, 오르막 경사각 제한. ( 추가설정 필요함 )
|
||||||
PhsXUserData m_tagData = {};
|
PhsXUserData m_tagData = {};
|
||||||
|
|
||||||
PSX::PxControllerCollisionFlags m_eBeforeCollisionFlags = {};
|
PSX::PxControllerCollisionFlags m_eBeforeCollisionFlags = {};
|
||||||
|
|||||||
Reference in New Issue
Block a user