[add] CCT Adjust

This commit is contained in:
kimnuri
2025-11-28 19:56:44 +09:00
parent 466381093e
commit 7e88b5ccfe
5 changed files with 10 additions and 11 deletions
@@ -159,7 +159,7 @@ void CCharacter_Controller::Move(_float fTimeDelta)
const PSX::PxObstacleContext* pPxObstacles = { nullptr }; // 캐릭터가 충돌해야할 추가적인 장애물 객체?, 닿은 장애물은 캐시된다?
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());
@@ -182,10 +182,10 @@ _vector CCharacter_Controller::Get_Position()
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();
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()
@@ -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.");
}
}
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")) {
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.");
@@ -133,7 +133,6 @@ PSX::PxRigidStatic* CPhysX_Manager::Add_StaticActor(CRigidBody_Static& RigidBody
m_HeightFieldGeometry.emplace(RigidBody.Get_PxMeshKey(), pPxHeightGeometry);
}
break;
break;
default:
assert(false);
break;
@@ -396,12 +396,13 @@ void CVIBuffer_Terrain::ConvertToHeightField(const _tchar* pStaticKey)
for (_uint iRow = 0; iRow < m_iNumVerticesZ; ++iRow) {
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];
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.materialIndex0 = pxSample.materialIndex1 = 0;