Merge branch 'Develope' into Effect
This commit is contained in:
@@ -288,6 +288,14 @@ _vector CCharacter_Controller::Get_FootPosition()
|
||||
return XMVectorSet((_float)pxLVecfootPos.x, (_float)pxLVecfootPos.y, (_float)pxLVecfootPos.z, 1.f );
|
||||
}
|
||||
|
||||
_vector CCharacter_Controller::Get_HeadPosition()
|
||||
{
|
||||
PSX::PxExtendedVec3 pxLVecfootPos = m_pController->getFootPosition();
|
||||
PSX::PxExtendedVec3 pxVPos = m_pController->getPosition();
|
||||
_float pxVecDiff = (_float)(pxVPos - pxLVecfootPos).y;
|
||||
return XMVectorSet((_float)pxVPos.x, (_float)pxVPos.y + pxVecDiff, (_float)pxVPos.z, 1.f);
|
||||
}
|
||||
|
||||
HRESULT CCharacter_Controller::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
|
||||
@@ -181,6 +181,27 @@ _float3 CRigidBody_Dynamic::Get_FootPosition()
|
||||
return vOut;
|
||||
}
|
||||
|
||||
_float3 CRigidBody_Dynamic::Get_HeadPosition()
|
||||
{
|
||||
PSX::PxTransform pxTransform = m_pRigidBody->getGlobalPose();
|
||||
switch (m_eActorType)
|
||||
{
|
||||
case Engine::ACTOR::BOX:
|
||||
pxTransform.p.y += m_vhalfGeometryInfo.y;
|
||||
break;
|
||||
case Engine::ACTOR::CAPSULE:
|
||||
pxTransform.p.y += m_vhalfGeometryInfo.y * 0.5f + m_vhalfGeometryInfo.x;
|
||||
break;
|
||||
case Engine::ACTOR::SPHERE:
|
||||
pxTransform.p.y += m_vhalfGeometryInfo.x;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
_float3 vOut = { pxTransform.p.x , pxTransform.p.y , pxTransform.p.z };
|
||||
return vOut;
|
||||
}
|
||||
|
||||
PSX::PxTransform CRigidBody_Dynamic::Get_FootPositionPxTransform()
|
||||
{
|
||||
PSX::PxTransform pxTransform = m_pRigidBody->getGlobalPose();
|
||||
|
||||
@@ -58,6 +58,7 @@ class ENGINE_DLL CCharacter_Controller final :
|
||||
void Set_Position(_fvector vNewPos); // 순간이동
|
||||
_vector Get_Position();
|
||||
_vector Get_FootPosition(); // ContactOffset이 고려된 발바닥 위치( 실제보다 바닥 위치가 더 아래에 위치한다는 뜻 )
|
||||
_vector Get_HeadPosition();
|
||||
|
||||
PSX::PxControllerCollisionFlags Get_CollisionFlags();
|
||||
void Resize_Volume(_float fHeight); // 높이를 수정하고 바닥에 붙임
|
||||
|
||||
@@ -50,6 +50,7 @@ class ENGINE_DLL CRigidBody_Dynamic : public CRigidBody
|
||||
|
||||
_vector Get_Position();
|
||||
_float3 Get_FootPosition();
|
||||
_float3 Get_HeadPosition();
|
||||
PSX::PxTransform Get_FootPositionPxTransform();
|
||||
private:
|
||||
PSX::PxRigidDynamic* m_pRigidBody = { nullptr }; // 실제 시뮬레이션을 도는 본체
|
||||
|
||||
Reference in New Issue
Block a user