@@ -88,7 +88,7 @@ void CBombard::Late_Update(_float fTimeDelta)
|
||||
if (false == m_bHit) {
|
||||
_vector vStartPos = XMLoadFloat4(&m_vStartPos);
|
||||
_vector vEndPos = XMLoadFloat4(&m_vEndPos);
|
||||
ON_COLLISION_INFO CollisionInfo = SweepTarget(vStartPos, vEndPos, 0.002f);
|
||||
ON_COLLISION_INFO CollisionInfo = SweepTarget(vStartPos, vEndPos, 0.002f , true);
|
||||
|
||||
OnCollision(this, &CollisionInfo);
|
||||
}
|
||||
|
||||
@@ -30,30 +30,15 @@ HRESULT CCamPosition_Shoulder::Initialize(void* pArg)
|
||||
|
||||
CAMERA_SHOULDER_DESC* pDesc = static_cast<CAMERA_SHOULDER_DESC*>(pArg);
|
||||
{
|
||||
m_fMouseSensor = pDesc->fMouseSensor;
|
||||
m_vShoulderPosRatio = pDesc->vInitialLook;
|
||||
m_fShoulderDistance = pDesc->fShoulderDistance;
|
||||
m_vAccDegreeXY = { 0.f, 0.f };
|
||||
m_fCameraFocalLength = pDesc->fCameraFocalLength;
|
||||
m_vBackFrontRatio.x = m_vBackFrontRatio.y = m_vBackFrontRatio.z = pDesc->fBackFrontRatio;
|
||||
m_pLookTransform = m_pTarget_LookPart->Get_Component<CTransform>();
|
||||
m_pFollowTransform = m_pTarget_FollowPart->Get_Component<CTransform>();
|
||||
m_pParentPos = m_pParentTransformCom->Get_StatePtr(STATE::POSITION);
|
||||
m_vFocalRatio.x = m_vFocalRatio.y;
|
||||
m_fFocalRatioTargetValue = m_vFocalRatio.y;
|
||||
|
||||
m_vShoulderOtherRatio = m_vShoulderPosRatio = m_vShoulderStartRatio = pDesc->vInitialLook;
|
||||
m_vShoulderStartRatio.x *= -1.f;
|
||||
m_pTransformCom->Set_State(STATE::POSITION,
|
||||
m_pParentTransformCom->Get_State(STATE::POSITION)
|
||||
+ XMVector3Normalize(XMLoadFloat3(&m_vShoulderPosRatio)) * m_fShoulderDistance);
|
||||
|
||||
_vector vShoulderPos = Get_WorldPostion();
|
||||
_vector vCameraLook = XMVectorSet(0.f, 0.f, 1.f, 0.f);
|
||||
_vector vRotCameraq = XMQuaternionRotationRollPitchYaw(XMConvertToRadians(m_vAccDegreeXY.x), XMConvertToRadians(m_vAccDegreeXY.y), 0.f);
|
||||
vCameraLook = XMVector3Normalize(XMVector3Rotate(vCameraLook, vRotCameraq));
|
||||
m_pTransformCom->Set_State(STATE::LOOK, vCameraLook);
|
||||
|
||||
CTransform* pLookTransform = m_pTarget_LookPart->Get_Component<CTransform>();
|
||||
CTransform* pFollowTransform = m_pTarget_FollowPart->Get_Component<CTransform>();
|
||||
|
||||
pLookTransform->Set_State(STATE::POSITION, vShoulderPos + vCameraLook * (m_fCameraFocalLength * m_vBackFrontRatio.z));
|
||||
pFollowTransform->Set_State(STATE::POSITION, vShoulderPos - vCameraLook * (m_fCameraFocalLength * (1 - m_vBackFrontRatio.z)));
|
||||
_vector vLookTargetPos = Calc_LookTargetPos();
|
||||
m_pLookTransform->Set_State(STATE::POSITION, vLookTargetPos);
|
||||
m_pFollowTransform->Set_State(STATE::POSITION, Calc_FollowTargetPos(vLookTargetPos));
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
@@ -64,62 +49,24 @@ void CCamPosition_Shoulder::Priority_Update(_float fTimeDelta)
|
||||
if (FAILED(m_pGameInstance->IsBinded_Camera(CAMERA_SHOULDER))) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_pGameInstance->Key_Up(DIK_PGDN))
|
||||
{
|
||||
Start_LerpShoulderPos();
|
||||
m_bLerp = !m_bLerp;
|
||||
}
|
||||
if (true == m_bMovable) {
|
||||
m_vAccDegreeXY.y += m_pGameInstance->Get_MouseMove().x * m_fMouseSensor;
|
||||
m_vAccDegreeXY.x += m_pGameInstance->Get_MouseMove().y * m_fMouseSensor;
|
||||
CMyTools::AdjustAccumulateDegreePitchYawDegree(m_vAccDegreeXY);
|
||||
m_vAccRotDegrees.y += m_pGameInstance->Get_MouseMove().x * m_fMouseSensor;
|
||||
m_vAccRotDegrees.x += m_pGameInstance->Get_MouseMove().y * m_fMouseSensor;
|
||||
CMyTools::AdjustAccumulateDegreePitchYawDegree(m_vAccRotDegrees);
|
||||
}
|
||||
|
||||
if (m_bLerp)
|
||||
{
|
||||
m_vPosLerpTimer.x += fTimeDelta;
|
||||
if (m_vPosLerpTimer.x > m_vPosLerpTimer.y) {
|
||||
m_vPosLerpTimer.x = 0.f;
|
||||
Start_LerpShoulderPos();
|
||||
_vector vLookTargetPos = Calc_LookTargetPos();
|
||||
m_pLookTransform->Set_State(STATE::POSITION, vLookTargetPos);
|
||||
m_pFollowTransform->Set_State(STATE::POSITION, Calc_FollowTargetPos(vLookTargetPos));
|
||||
|
||||
_float focalRatioLerpAlpha = fTimeDelta * m_fFocalRatioLerpSpeed;
|
||||
if (focalRatioLerpAlpha > 1.f)
|
||||
{
|
||||
focalRatioLerpAlpha = 1.f;
|
||||
}
|
||||
_vector vShoulderPos = XMVectorLerp(XMLoadFloat4(&m_StartPos), XMLoadFloat4(&m_DestPos), (m_vPosLerpTimer.x / m_vPosLerpTimer.y));
|
||||
m_pTransformCom->Set_State(STATE::POSITION, vShoulderPos);
|
||||
|
||||
_vector vRotCameraq = XMQuaternionRotationRollPitchYaw(XMConvertToRadians(m_vAccDegreeXY.x), XMConvertToRadians(m_vAccDegreeXY.y), 0.f);
|
||||
_vector vCameraLook = XMVector3Normalize(XMVector3Rotate(XMVectorSet(0.f, 0.f, 1.f, 0.f), vRotCameraq));
|
||||
m_pTransformCom->Set_State(STATE::LOOK, vCameraLook);
|
||||
|
||||
CTransform* pLookTransform = m_pTarget_LookPart->Get_Component<CTransform>();
|
||||
CTransform* pFollowTransform = m_pTarget_FollowPart->Get_Component<CTransform>();
|
||||
|
||||
_float fCamPosRatio = Calc_CamPosRatio();
|
||||
|
||||
pLookTransform->Set_State(STATE::POSITION, vShoulderPos + vCameraLook * (m_fCameraFocalLength * fCamPosRatio));
|
||||
pFollowTransform->Set_State(STATE::POSITION, vShoulderPos - vCameraLook * (m_fCameraFocalLength * (1 - fCamPosRatio)));
|
||||
m_vFocalRatio.x = CMyTools::Lerp_f1D(m_vFocalRatio.x, m_fFocalRatioTargetValue, focalRatioLerpAlpha);
|
||||
}
|
||||
else
|
||||
{
|
||||
_vector vLook = XMVector3Normalize(XMLoadFloat3(&m_vShoulderPosRatio));
|
||||
_vector vRotq = XMQuaternionRotationRollPitchYaw(0.f, XMConvertToRadians(m_vAccDegreeXY.y), 0.f);
|
||||
vLook = XMVector3Normalize(XMVector3Rotate(vLook, vRotq));
|
||||
|
||||
m_pTransformCom->Set_State(STATE::POSITION, m_pParentTransformCom->Get_State(STATE::POSITION) + XMVector3Normalize(vLook) * m_fShoulderDistance);
|
||||
_vector vShoulderPos = Get_WorldPostion();
|
||||
_vector vCameraLook = XMVectorSet(0.f, 0.f, 1.f, 0.f);
|
||||
_vector vRotCameraq = XMQuaternionRotationRollPitchYaw(XMConvertToRadians(m_vAccDegreeXY.x), XMConvertToRadians(m_vAccDegreeXY.y), 0.f);
|
||||
vCameraLook = XMVector3Normalize(XMVector3Rotate(vCameraLook, vRotCameraq));
|
||||
m_pTransformCom->Set_State(STATE::LOOK, vCameraLook);
|
||||
|
||||
CTransform* pLookTransform = m_pTarget_LookPart->Get_Component<CTransform>();
|
||||
CTransform* pFollowTransform = m_pTarget_FollowPart->Get_Component<CTransform>();
|
||||
|
||||
_float fCamPosRatio = Calc_CamPosRatio();
|
||||
|
||||
pLookTransform->Set_State(STATE::POSITION, vShoulderPos + vCameraLook * (m_fCameraFocalLength * fCamPosRatio));
|
||||
pFollowTransform->Set_State(STATE::POSITION, vShoulderPos - vCameraLook * (m_fCameraFocalLength * (1 - fCamPosRatio)));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void CCamPosition_Shoulder::Update(_float fTimeDelta)
|
||||
@@ -142,10 +89,18 @@ void CCamPosition_Shoulder::Update(_float fTimeDelta)
|
||||
m_pGameInstance->Toggle_MouseCenter();
|
||||
}
|
||||
if (m_pGameInstance->Key_Up(DIK_P)) {
|
||||
m_vShoulderOtherRatio = m_vShoulderPosRatio = m_vShoulderStartRatio;
|
||||
m_vShoulderStartRatio.x *= -1.f;
|
||||
m_bShoulderLerp = true;
|
||||
m_bRightShoulderActive = !m_bRightShoulderActive;
|
||||
|
||||
m_vShoulderLerpDegree.x = m_fFollowTargetIncludedAngleDegree;
|
||||
if (true == m_bRightShoulderActive) {
|
||||
m_vShoulderLerpDegree.y = m_vShoulderLerpIncludedAngleDegree.y;
|
||||
}
|
||||
else {
|
||||
m_vShoulderLerpDegree.y = m_vShoulderLerpIncludedAngleDegree.x;
|
||||
}
|
||||
|
||||
m_vShoulderLerpTimer.x = 0.f;
|
||||
m_bShoulderLerp = true;
|
||||
}
|
||||
if (m_pGameInstance->Mouse_Pressing(DIM_RBUTTON)) {
|
||||
m_pBinded_Camera->ZoomIn(fTimeDelta);
|
||||
@@ -162,14 +117,20 @@ void CCamPosition_Shoulder::Late_Update(_float fTimeDelta)
|
||||
if (FAILED(m_pGameInstance->IsBinded_Camera(CAMERA_SHOULDER))) {
|
||||
return;
|
||||
}
|
||||
if (true == m_bShoulderLerp) {
|
||||
if (true == m_bShoulderLerp)
|
||||
{
|
||||
m_vShoulderLerpTimer.x += fTimeDelta;
|
||||
XMStoreFloat3(&m_vShoulderPosRatio, XMVectorLerp(XMLoadFloat3(&m_vShoulderStartRatio), XMLoadFloat3(&m_vShoulderOtherRatio), m_vShoulderLerpTimer.x / m_vShoulderLerpTimer.y));
|
||||
if (m_vShoulderLerpTimer.x > m_vShoulderLerpTimer.y) {
|
||||
m_bShoulderLerp = false;
|
||||
m_vShoulderLerpTimer.x = 0.f;
|
||||
|
||||
m_vShoulderPosRatio = m_vShoulderOtherRatio;
|
||||
_float fLerpRatio = m_vShoulderLerpTimer.x/m_vShoulderLerpTimer.y;
|
||||
if (fLerpRatio >= 1.f) {
|
||||
fLerpRatio = 1.f;
|
||||
m_bShoulderLerp = false;
|
||||
}
|
||||
if (false == m_bShoulderLerp) {
|
||||
m_vShoulderLerpTimer.x = 0.f;
|
||||
m_fFollowTargetIncludedAngleDegree = m_vShoulderLerpDegree.y;
|
||||
} else {
|
||||
m_fFollowTargetIncludedAngleDegree = CMyTools::Lerp_f1D(m_vShoulderLerpDegree.x, m_vShoulderLerpDegree.y, fLerpRatio);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -184,6 +145,113 @@ _vector CCamPosition_Shoulder::Get_WorldPostion()
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
_vector CCamPosition_Shoulder::Calc_LookTargetPos()
|
||||
{
|
||||
_vector vParentPos = XMLoadFloat4(m_pParentPos);
|
||||
|
||||
_vector vFoward = { 0.f, 0.f, 1.f, 0.f };
|
||||
_vector vRotCameraq = XMQuaternionRotationRollPitchYaw(XMConvertToRadians(m_vAccRotDegrees.x), XMConvertToRadians(m_vAccRotDegrees.y), 0.f);
|
||||
vFoward = XMVector3Normalize(XMVector3Rotate(vFoward, vRotCameraq));
|
||||
|
||||
_vector vHeadPos = vParentPos + XMVectorSet(0.f, m_fHeadHeight, 0.f, 0.f);
|
||||
_vector vFowardPos = vHeadPos + vFoward * m_fCameraFowardDistance;
|
||||
|
||||
return XMVectorLerp(vHeadPos, vFowardPos, m_vFocalRatio.x);
|
||||
}
|
||||
_vector CCamPosition_Shoulder::Calc_FollowTargetPos(_vector vLookTargetWorldPos)
|
||||
{
|
||||
_float fBestFollowTargetDistance = m_fCameraBarrelLength * (1.f - m_fDefaultCameraBackToFrontRatio);
|
||||
|
||||
_vector fRotQ = XMQuaternionRotationAxis(XMVectorSet(0.f, 1.f, 0.f, 0.f), XMConvertToRadians(-m_fFollowTargetIncludedAngleDegree));
|
||||
_vector vParentPos = XMLoadFloat4(m_pParentPos);
|
||||
_vector vHeadPos = vParentPos + XMVectorSet(0.f, m_fHeadHeight, 0.f, 0.f);
|
||||
_vector vDir = XMVector3Normalize(vHeadPos - vLookTargetWorldPos);
|
||||
vDir = XMVector3Rotate(vDir, fRotQ);
|
||||
|
||||
m_BufferHit = {};
|
||||
_bool bHit = m_pGameInstance->SphereCast( 0.25f, vLookTargetWorldPos, vDir, fBestFollowTargetDistance,
|
||||
PSX::PxHitFlag::eDEFAULT, PSX::PxQueryFlag::eSTATIC/*|PSX::PxQueryFlag::eDYNAMIC*/, m_BufferHit);
|
||||
|
||||
if (false == bHit) {
|
||||
return vLookTargetWorldPos + vDir * fBestFollowTargetDistance;
|
||||
}
|
||||
|
||||
vector<PSX::PxSweepHit> sweepHits;
|
||||
_uint iTouchCount = m_BufferHit.getNbTouches();
|
||||
|
||||
if (true == m_BufferHit.hasBlock) {
|
||||
sweepHits.reserve(iTouchCount + 1);
|
||||
sweepHits.emplace_back(m_BufferHit.block);
|
||||
}
|
||||
else {
|
||||
sweepHits.reserve(iTouchCount);
|
||||
}
|
||||
|
||||
auto* touches = m_BufferHit.getTouches();
|
||||
for (_uint index = 0; index < iTouchCount; ++index) {
|
||||
sweepHits.emplace_back(touches[index]);
|
||||
}
|
||||
CMyTools::SortHitsByDistance(sweepHits);
|
||||
|
||||
// 벽면에서 팔로우 타겟을 살짝 띄우는 오프셋
|
||||
_float fCameraSurfaceOffset = 0.05f;
|
||||
_float fCameraMinDistance = 0.20f;
|
||||
_float fDistance = { };
|
||||
_float fFinalTargetDistance = fBestFollowTargetDistance;
|
||||
for (auto& hit : sweepHits)
|
||||
{
|
||||
fDistance = hit.distance - fCameraSurfaceOffset;
|
||||
if (fDistance < fFinalTargetDistance) {
|
||||
if (fDistance < fCameraMinDistance) {
|
||||
fDistance = fCameraMinDistance;
|
||||
}
|
||||
fFinalTargetDistance = fDistance;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
_float fSafeDistance = fBestFollowTargetDistance;
|
||||
if (fSafeDistance < FLT_EPSILON3)
|
||||
{
|
||||
fSafeDistance = FLT_EPSILON3;
|
||||
}
|
||||
|
||||
_float fBestFocalRatio = m_vFocalRatio.y * fFinalTargetDistance / fSafeDistance;
|
||||
|
||||
if (fBestFocalRatio < m_fFocalRatioMin) {
|
||||
fBestFocalRatio = m_fFocalRatioMin;
|
||||
} else if (fBestFocalRatio > m_vFocalRatio.y) {
|
||||
fBestFocalRatio = m_vFocalRatio.y;
|
||||
}
|
||||
|
||||
m_fFocalRatioTargetValue = fBestFocalRatio;
|
||||
|
||||
return vLookTargetWorldPos + vDir * fFinalTargetDistance;
|
||||
}
|
||||
_vector CCamPosition_Shoulder::Get_ShoulderGlobalPos()
|
||||
{
|
||||
// Right/Left 숄더를 로컬 X 부호로 결정
|
||||
_float shoulderSideSign = (true == m_bRightShoulderActive) ? 1.f : -1.f;
|
||||
|
||||
_float3 shoulderLocalPosition = m_vShoulderLocalPos;
|
||||
shoulderLocalPosition.x *= shoulderSideSign;
|
||||
|
||||
_vector shoulderLocalOffset = XMLoadFloat3(&shoulderLocalPosition);
|
||||
|
||||
// 카메라 회전(현재 마우스로 누적된 pitch/yaw)
|
||||
_vector cameraRotationQuaternion = XMQuaternionRotationRollPitchYaw(
|
||||
XMConvertToRadians(m_vAccRotDegrees.x),
|
||||
XMConvertToRadians(m_vAccRotDegrees.y),
|
||||
0.f
|
||||
);
|
||||
|
||||
// 카메라 로컬 오프셋을 카메라 회전에 맞춰 월드로 회전
|
||||
_vector shoulderWorldOffset = XMVector3Rotate(shoulderLocalOffset, cameraRotationQuaternion);
|
||||
|
||||
return shoulderWorldOffset;
|
||||
}
|
||||
|
||||
|
||||
HRESULT CCamPosition_Shoulder::Ready_Components(void* pArg)
|
||||
{
|
||||
CTransform::TRANSFORM_DESC DescTransfrom = {};
|
||||
@@ -230,60 +298,7 @@ HRESULT CCamPosition_Shoulder::Ready_SubParts()
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
void CCamPosition_Shoulder::Start_LerpShoulderPos()
|
||||
{
|
||||
XMStoreFloat4(&m_StartPos, m_pTransformCom->Get_State(STATE::POSITION));
|
||||
|
||||
_vector vLook = XMVector3Normalize(XMLoadFloat3(&m_vShoulderPosRatio));
|
||||
_vector vRotq = XMQuaternionRotationRollPitchYaw(0.f, XMConvertToRadians(m_vAccDegreeXY.y), 0.f);
|
||||
vLook = XMVector3Normalize(XMVector3Rotate(vLook, vRotq));
|
||||
|
||||
XMStoreFloat4(&m_DestPos, m_pParentTransformCom->Get_State(STATE::POSITION) + XMVector3Normalize(vLook) * m_fShoulderDistance);
|
||||
}
|
||||
_float CCamPosition_Shoulder::Calc_CamPosRatio()
|
||||
{
|
||||
_vector vPos = m_pTransformCom->Get_State(STATE::POSITION);
|
||||
_vector vLook = m_pTransformCom->Get_State(STATE::LOOK);
|
||||
|
||||
m_BufferHit = {};
|
||||
_bool bHit = { false };
|
||||
_float fBestCamDistance = m_fCameraFocalLength * (1 - m_vBackFrontRatio.z);
|
||||
_float fBestCamRatio = m_vBackFrontRatio.z;
|
||||
bHit = m_pGameInstance->SphereCast(0.35f, vPos, -vLook, fBestCamDistance, PSX::PxHitFlag::eDEFAULT, PSX::PxQueryFlag::eSTATIC | PSX::PxQueryFlag::eDYNAMIC, m_BufferHit);
|
||||
if (true == bHit) {
|
||||
vector<PSX::PxSweepHit> vecHits = {};
|
||||
_uint iHitCount = {};
|
||||
{ // HitSort
|
||||
vecHits.reserve(m_BufferHit.getNbTouches() + (m_BufferHit.hasBlock) ? 1 : 0);
|
||||
iHitCount = m_BufferHit.getNbTouches();
|
||||
auto* pTouch = m_BufferHit.getTouches();
|
||||
for (_uint i = 0; i < iHitCount; ++i) {
|
||||
vecHits.emplace_back(pTouch[i]);
|
||||
}
|
||||
if (true == m_BufferHit.hasBlock) {
|
||||
vecHits.emplace_back(m_BufferHit.block);
|
||||
iHitCount += 1;
|
||||
}
|
||||
CMyTools::SortHitsByDistance(vecHits);
|
||||
}
|
||||
for (_uint i = 0; i < iHitCount; ++i) { // TODO: 럴프 할 수 있을까
|
||||
if (vecHits[i].distance < fBestCamDistance) {
|
||||
fBestCamDistance = vecHits[i].distance;
|
||||
fBestCamRatio = (1 - (1 - m_vBackFrontRatio.z) * (fBestCamDistance / m_fCameraFocalLength));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return fBestCamRatio;
|
||||
}
|
||||
_vector CCamPosition_Shoulder::Get_ShoulderLocalPos()
|
||||
{
|
||||
_vector vLook = XMVector3Normalize(3.f * (XMVectorSetZ(XMLoadFloat3(&m_vShoulderPosRatio), 0.f)));
|
||||
_vector vRotq = XMQuaternionRotationRollPitchYaw(0.f, XMConvertToRadians(m_vAccDegreeXY.y), 0.f);
|
||||
vLook = XMVector3Normalize(XMVector3Rotate(vLook, vRotq));
|
||||
return vLook * m_fShoulderDistance;
|
||||
}
|
||||
CCamPosition_Shoulder* CCamPosition_Shoulder::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CCamPosition_Shoulder* pInstance = new CCamPosition_Shoulder(pDevice, pContext);
|
||||
@@ -323,10 +338,11 @@ void CCamPosition_Shoulder::Describe_Entity()
|
||||
m_pTransformCom->Describe_Entity();
|
||||
|
||||
GUI::Text("fMouseSensor : %.1f", m_fMouseSensor);
|
||||
GUI::SliderFloat("ShoulderDistance", &m_fShoulderDistance, 0.f, 10.f, "%.1f");
|
||||
GUI::Text("BackFrontRatio %.1f, %.1f, %.1f", &m_vBackFrontRatio.x, &m_vBackFrontRatio.y, &m_vBackFrontRatio.z);
|
||||
GUI::Text("Pitch Yaw : %f %f", m_vAccDegreeXY.x, m_vAccDegreeXY.y);
|
||||
GUI::SliderFloat3("ShoulderPosRatio", (_float*)&m_vShoulderPosRatio, -2.f, 2.f, "%.1f");
|
||||
GUI::SliderFloat("m_fFollowTargetIncludedAngleDegree", &m_fFollowTargetIncludedAngleDegree, -360.f, 360.f, "%.1f");
|
||||
GUI::SliderFloat("m_fDefaultCameraBackToFrontRatio", &m_fDefaultCameraBackToFrontRatio, -1.f, 1.f);
|
||||
GUI::SliderFloat("m_vFocalRatio", &m_vFocalRatio.x, 0.f, 1.f);
|
||||
GUI::SliderFloat("m_fCameraFowardDistance", &m_fCameraFowardDistance, 0.f, 4.f);
|
||||
//GUI::
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
|
||||
@@ -756,6 +756,9 @@ HRESULT CEffectObject::Bind_ShaderResources()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fEmissiveColorCut", &m_EffectInfo.fEmissiveColorCut, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "Troll_Nomal_Smoke.h"
|
||||
#include "TrollSwing.h"
|
||||
#include "Goblin_Protego.h"
|
||||
#include "Goblin_Attack.h"
|
||||
|
||||
CEffectPool::CEffectPool(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CGameObject(pDevice, pContext)
|
||||
@@ -304,6 +305,16 @@ HRESULT CEffectPool::Ready_MonsterEffect()
|
||||
|
||||
return pEffect; }
|
||||
))) return E_FAIL;
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::GOBLIN_ATTACK, 5, NEXT_LEVEL, NEXT_LEVEL, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CGoblin_Attack* pEffect = nullptr;
|
||||
|
||||
pEffect = m_pGameInstance->Clone_Prototype<CGoblin_Attack>(iPrototypeLevel, nullptr);
|
||||
|
||||
return pEffect; }
|
||||
|
||||
))) return E_FAIL;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -364,7 +364,7 @@ ON_COLLISION_INFO CEffect_Container::SweepTarget(_vector StartPos, _vector EndPo
|
||||
const PSX::PxSweepHit& hit = pxBuffer.block;
|
||||
PSX::PxRigidActor* pActor = hit.actor;
|
||||
PSX::PxShape* pShape = hit.shape;
|
||||
ON_COLLISION_INFO tagCollInfo = {};
|
||||
ON_COLLISION_INFO tagCollInfo = {};
|
||||
|
||||
tagCollInfo.vWorldPos.w = 1.f;
|
||||
|
||||
@@ -413,35 +413,51 @@ ON_COLLISION_INFO CEffect_Container::SweepTarget(_vector StartPos, _vector EndPo
|
||||
}
|
||||
}
|
||||
|
||||
if (isTerrainCollision == true && bHit == false)
|
||||
|
||||
}
|
||||
|
||||
if (isTerrainCollision == true && bHit == false)
|
||||
{
|
||||
memcpy_s(&tagCollInfo.vWorldPos, sizeof(tagCollInfo.vWorldPos), &hit.position, sizeof(hit.position));
|
||||
memcpy_s(&tagCollInfo.vWorldNomal, sizeof(tagCollInfo.vWorldNomal), &hit.normal, sizeof(hit.normal));
|
||||
XMStoreFloat4(&tagCollInfo.vHitDir, vDir);
|
||||
tagCollInfo.fLength = fDistance;
|
||||
tagCollInfo.pObject = m_pOwner->Get_Owner();
|
||||
|
||||
bHit = m_pGameInstance->SphereCast(fRadius, vStartPos, vDir, fDistance, PSX::PxHitFlag::ePOSITION | PSX::PxHitFlag::eNORMAL, PSX::PxQueryFlag::eSTATIC, pxBuffer);
|
||||
|
||||
const PSX::PxSweepHit& hit = pxBuffer.block;
|
||||
PSX::PxRigidActor* pActor = hit.actor;
|
||||
PSX::PxShape* pShape = hit.shape;
|
||||
|
||||
tagCollInfo.vWorldPos.w = 1.f;
|
||||
|
||||
if (bHit)
|
||||
{
|
||||
memcpy_s(&tagCollInfo.vWorldPos, sizeof(tagCollInfo.vWorldPos), &hit.position, sizeof(hit.position));
|
||||
memcpy_s(&tagCollInfo.vWorldNomal, sizeof(tagCollInfo.vWorldNomal), &hit.normal, sizeof(hit.normal));
|
||||
XMStoreFloat4(&tagCollInfo.vHitDir, vDir);
|
||||
tagCollInfo.fLength = fDistance;
|
||||
tagCollInfo.pObject = m_pOwner->Get_Owner();
|
||||
|
||||
bHit = m_pGameInstance->SphereCast(fRadius, vStartPos, vDir, fDistance, PSX::PxHitFlag::ePOSITION | PSX::PxHitFlag::eNORMAL, PSX::PxQueryFlag::eSTATIC, pxBuffer);
|
||||
|
||||
PhsXUserData* pUserData = static_cast<PhsXUserData*>(pActor->userData);
|
||||
tagCollInfo.pObject = pUserData->pOwner;
|
||||
|
||||
switch (pUserData->eKind)
|
||||
{
|
||||
case PHYSX_KIND::CCTActor:
|
||||
if (nullptr != pActor && nullptr != pActor->userData)
|
||||
{
|
||||
PhsXUserData* pUserData = static_cast<PhsXUserData*>(pActor->userData);
|
||||
tagCollInfo.pObject = pUserData->pOwner;
|
||||
|
||||
switch (PXOBJECT(pUserData->iSubKind))
|
||||
{
|
||||
case PXOBJECT::TERRAIN:
|
||||
{
|
||||
|
||||
bHit = true;
|
||||
m_bHit = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
return tagCollInfo;
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "Goblin_Dagger.h"
|
||||
#include "Goblin_Spector.h"
|
||||
#include "Effect_Container.h"
|
||||
#include "EffectPool.h"
|
||||
|
||||
#pragma region STATE
|
||||
#include "State_Idle.h"
|
||||
@@ -65,6 +66,9 @@ m_pCallBack_HitReport->Initialize(m_pCharacter_Controller, m_pRigidBody);
|
||||
|
||||
m_pCharacter_Controller->Set_Position(XMVectorSet(-40.f, 5.f, -20.f, 1.f));
|
||||
|
||||
m_pEffectPool = m_pGameInstance->Get_Layer(NEXT_LEVEL, TEXT("Layer_EffectPool"))->Get_Object<CEffectPool>();
|
||||
SAFE_ADDREF(m_pEffectPool);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -463,6 +467,7 @@ void CGoblin::Free()
|
||||
SAFE_RELEASE(m_pSmoke);
|
||||
SAFE_RELEASE(m_pGoblin_Particle);
|
||||
SAFE_RELEASE(m_pGoblin_Particle2);
|
||||
SAFE_RELEASE(m_pEffectPool);
|
||||
Safe_Delete(m_pCallBack_Behavior);
|
||||
Safe_Delete(m_pCallBack_HitReport);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "EffectParts.h"
|
||||
#include "Wand.h"
|
||||
#include "Player.h"
|
||||
#include "Goblin_BattleAxe.h"
|
||||
|
||||
CGoblin_Attack::CGoblin_Attack(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CEffect_Container{ pDevice, pContext }
|
||||
@@ -36,8 +37,10 @@ HRESULT CGoblin_Attack::Initialize(void* pArg)
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
m_wstrEffectName = L"TrollSwing";
|
||||
m_wstrEffectName = L"GoblinAttack";
|
||||
|
||||
m_pPT1 = Get_PartObject<CEffectParts>("Goblin_Particle");
|
||||
m_pPT2 = Get_PartObject<CEffectParts>("Goblin_Particle2");
|
||||
|
||||
m_fDuration = 2.f;
|
||||
|
||||
@@ -60,6 +63,13 @@ void CGoblin_Attack::Update(_float fTimeDelta)
|
||||
Update_Event(fTimeDelta);
|
||||
|
||||
|
||||
CGoblin_BattleAxe* pAxe = static_cast<CGoblin_BattleAxe*>(m_pOwner);
|
||||
|
||||
_float4x4 AxeMat = pAxe->Get_AxeMatrix();
|
||||
|
||||
m_pPT1->Get_Component<CTransform>()->Set_WorldMatrix(XMLoadFloat4x4(&AxeMat));
|
||||
m_pPT2->Get_Component<CTransform>()->Set_WorldMatrix(XMLoadFloat4x4(&AxeMat));
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -77,10 +87,13 @@ HRESULT CGoblin_Attack::Pre_Setting(CGameObject* pObject, void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Pre_Setting(pObject, nullptr)))
|
||||
return E_FAIL;
|
||||
|
||||
CGoblin_BattleAxe* pAxe = static_cast<CGoblin_BattleAxe*>(m_pOwner);
|
||||
|
||||
_float4x4 AxeMat = pAxe->Get_AxeMatrix();
|
||||
|
||||
m_pPT1 = Get_PartObject<CEffectParts>("Goblin_Particle");
|
||||
m_pPT2 = Get_PartObject<CEffectParts>("Goblin_Particle2");
|
||||
|
||||
m_pPT1->Get_Component<CTransform>()->Set_WorldMatrix(XMLoadFloat4x4(&AxeMat));
|
||||
m_pPT2->Get_Component<CTransform>()->Set_WorldMatrix(XMLoadFloat4x4(&AxeMat));
|
||||
|
||||
m_pPT1->Set_Visible(true);
|
||||
m_pPT2->Set_Visible(true);
|
||||
|
||||
@@ -67,6 +67,16 @@ void CGoblin_BattleAxe::Update(_float fTimeDelta)
|
||||
m_bVisible = false;
|
||||
}
|
||||
}
|
||||
|
||||
_matrix AxeMat = XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("Bone"));
|
||||
|
||||
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
AxeMat.r[i] = XMVector3Normalize(AxeMat.r[i]);
|
||||
}
|
||||
|
||||
XMStoreFloat4x4(&m_vAxeMat, AxeMat * m_pTransformCom->Get_XMWorldMatrix());
|
||||
|
||||
}
|
||||
|
||||
void CGoblin_BattleAxe::Late_Update(_float fTimeDelta)
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
#include "Goblin_Spector.h"
|
||||
#include "EffectParts.h"
|
||||
|
||||
#include "EffectPool.h"
|
||||
#include "Goblin_BattleAxe.h"
|
||||
|
||||
#pragma region STATE
|
||||
#include "State_Idle.h"
|
||||
#include "State_IdleBreak.h"
|
||||
@@ -243,6 +246,8 @@ void CGoblin::Behavior_SwingEnter()
|
||||
[this]() {
|
||||
m_pGoblinSpector->Set_Visible(true);
|
||||
m_pGoblinSpector->Spector_Trail_Visible(true);
|
||||
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::GOBLIN_ATTACK, m_pGoblinSpector->Get_PartObject<CGoblin_BattleAxe>());
|
||||
},
|
||||
0.05f);
|
||||
|
||||
|
||||
@@ -383,14 +383,51 @@ HRESULT CLevel_GamePlay::Ready_IntstanceProp()
|
||||
return E_FAIL;
|
||||
|
||||
/* OakTree_TallA */
|
||||
Desc.isShake = true;
|
||||
Desc.vRadius = _float2(0.f, 0.01f);
|
||||
Desc.isShake = false;
|
||||
Desc.vRadius = _float2(0.015f, 0.016f);
|
||||
Desc.vSpeed = _float2(0.01f, 0.1f);
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_OakTree_TallA";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/OakTree_TallA.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
|
||||
return E_FAIL;
|
||||
|
||||
/* Shrub_B */
|
||||
Desc.isShake = true;
|
||||
Desc.vRadius = _float2(0.015f, 0.04f);
|
||||
Desc.vSpeed = _float2(0.3f, 1.f);
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_Shrub_B";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Shrub_B.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
|
||||
return E_FAIL;
|
||||
|
||||
/* BogMyrtle_A */
|
||||
Desc.isShake = true;
|
||||
Desc.vRadius = _float2(0.015f, 0.04f);
|
||||
Desc.vSpeed = _float2(0.3f, 1.f);
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_BogMyrtle_A";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/BogMyrtle_A.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
|
||||
return E_FAIL;
|
||||
|
||||
/* Dogwood_B */
|
||||
Desc.isShake = true;
|
||||
Desc.vRadius = _float2(0.015f, 0.02f);
|
||||
Desc.vSpeed = _float2(0.3f, 1.f);
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_Dogwood_B";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Dogwood_B.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
|
||||
return E_FAIL;
|
||||
|
||||
/* ScotsPine_LargeA */
|
||||
Desc.isShake = false;
|
||||
Desc.vRadius = _float2(0.015f, 0.02f);
|
||||
Desc.vSpeed = _float2(0.3f, 1.f);
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_ScotsPine_LargeA";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/ScotsPine_LargeA.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, LAYER_BACKGROUND, &Desc)))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -133,6 +133,7 @@
|
||||
|
||||
#include "WandEnd.h"
|
||||
#include "Goblin_Protego.h"
|
||||
#include "Goblin_Attack.h"
|
||||
|
||||
|
||||
|
||||
@@ -1524,6 +1525,10 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CGoblin_Attack>(NEXT_LEVEL, CGoblin_Attack::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CWandEnd>(NEXT_LEVEL, CWandEnd::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -1908,6 +1913,30 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_OakTree_TallA.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_Shrub_B*/
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_Shrub_B"),
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_GenericShrub_B.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_BogMyrtle_A*/
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_BogMyrtle_A"),
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_BogMyrtle_A.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_Dogwood_B*/
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_Dogwood_B"),
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_Dogwood_B.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_ScotsPine_LargeA*/
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_ScotsPine_LargeA"),
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_ScotsPine_LargeA_Master.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
#pragma endregion
|
||||
|
||||
/* For.Prototype_Component_South_Hogwart_Land_LOD1 */
|
||||
|
||||
@@ -153,7 +153,7 @@ void CPlayer::UpdateGrapInteractive(Engine::_float fTimeDelta)
|
||||
{
|
||||
if (nullptr != m_pGrapInteractive) {
|
||||
m_vGrapInteratableLerp.x += fTimeDelta;
|
||||
m_pGrapInteractive->GrapToPlayer(m_pTransformCom->Get_State(STATE::POSITION) + m_pCamPosition_ShoulderPart->Get_ShoulderLocalPos(), m_vGrapInteratableLerp.x);
|
||||
m_pGrapInteractive->GrapToPlayer(m_pTransformCom->Get_State(STATE::POSITION) + m_pCamPosition_ShoulderPart->Get_ShoulderGlobalPos(), m_vGrapInteratableLerp.x);
|
||||
if (m_vGrapInteratableLerp.x > m_vGrapInteratableLerp.y) {
|
||||
m_vGrapInteratableLerp.x -= m_vGrapInteratableLerp.y;
|
||||
}
|
||||
@@ -417,12 +417,6 @@ HRESULT CPlayer::Ready_Parts()
|
||||
{
|
||||
CCamPosition_Shoulder::CAMERA_SHOULDER_DESC Desc;
|
||||
Desc.pParentTransform = m_pTransformCom;
|
||||
Desc.fMouseSensor = 0.1f;
|
||||
Desc.fShoulderDistance = 2.f;
|
||||
Desc.fBackFrontRatio = 0.9f;
|
||||
Desc.fCameraFocalLength = 13.4f;
|
||||
Desc.vInitialLook = { 0.77f, 1.35f, -1.f };
|
||||
|
||||
if (FAILED(Add_PartObject<CCamPosition_Shoulder>("Cam_Shoulder_Part", g_iStaticLevel, &m_pCamPosition_ShoulderPart, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -822,20 +822,8 @@ void CPlayer::Behavior_CombatEnter()
|
||||
m_vGrapInteratableLerp.x = 0.f;
|
||||
return;
|
||||
}
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() { _vector vDir = {};
|
||||
_float vDistance = 45.f;
|
||||
CRigidBody_Dynamic* pBody = m_pGrapInteractive->Get_Component<CRigidBody_Dynamic>();
|
||||
if (nullptr != m_LockOnInfo.pUnit) {
|
||||
vDir = XMVector3Normalize(m_LockOnInfo.pUnit->Get_LockOnPos() - m_pGrapInteractive->Get_LockOnPos());
|
||||
}
|
||||
else {
|
||||
vDir = m_pTransformCom->Get_State(STATE::LOOK);
|
||||
}
|
||||
m_pGrapInteractive->Set_KinematicFlag(false);
|
||||
pBody->Add_Force(vDir * vDistance, PSX::PxForceMode::eIMPULSE);
|
||||
SAFE_RELEASE(m_pGrapInteractive); },
|
||||
[this]() { Throwing_Interactive(); },
|
||||
0.2f);
|
||||
}
|
||||
else if (m_pGameInstance->Key_Down(DIK_G)) {
|
||||
@@ -886,24 +874,20 @@ HRESULT CPlayer::Behavior_CombatExitCheck()
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
}
|
||||
else if (m_pGameInstance->Key_Down(DIK_Z)) {
|
||||
m_pFSM->Enable_State(FSMSTATE::ANCIENT_THROW);
|
||||
pairAnimInfo = m_Animation[STATEANIM::ANCIENT_THROW];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() { _vector vDir = {};
|
||||
_float vDistance = 45.f;
|
||||
CRigidBody_Dynamic* pBody = m_pGrapInteractive->Get_Component<CRigidBody_Dynamic>();
|
||||
if (nullptr != m_LockOnInfo.pUnit) {
|
||||
vDir = XMVector3Normalize(m_LockOnInfo.pUnit->Get_LockOnPos() - m_pGrapInteractive->Get_LockOnPos());
|
||||
if (nullptr != m_pGrapInteractive) {
|
||||
m_pFSM->Enable_State(FSMSTATE::ANCIENT_THROW);
|
||||
pairAnimInfo = m_Animation[STATEANIM::ANCIENT_THROW];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() { Throwing_Interactive(); },
|
||||
0.2f);
|
||||
}
|
||||
else {
|
||||
vDir = m_pTransformCom->Get_State(STATE::LOOK);
|
||||
else if (nullptr != m_LockOnInfo.pInteractive) {
|
||||
m_pGrapInteractive = m_LockOnInfo.pInteractive;
|
||||
SAFE_ADDREF(m_pGrapInteractive);
|
||||
m_pGrapInteractive->Set_KinematicFlag(true);
|
||||
m_vGrapInteratableLerp.x = 0.f;
|
||||
}
|
||||
m_pGrapInteractive->Set_KinematicFlag(false);
|
||||
pBody->Add_Force(vDir * vDistance, PSX::PxForceMode::eIMPULSE);
|
||||
SAFE_RELEASE(m_pGrapInteractive); },
|
||||
0.2f);
|
||||
}
|
||||
else if (m_pGameInstance->Key_Down(DIK_G)) {
|
||||
m_pFSM->Enable_State(FSMSTATE::POTION);
|
||||
@@ -1534,6 +1518,23 @@ void CPlayer::Player_InterpTurn(_float fTimeDelta)
|
||||
}
|
||||
}
|
||||
|
||||
void CPlayer::Throwing_Interactive()
|
||||
{
|
||||
if (nullptr == m_pGrapInteractive) {
|
||||
return;
|
||||
} _vector vDir = {}; _float vDistance = 45.f;
|
||||
CRigidBody_Dynamic* pBody = m_pGrapInteractive->Get_Component<CRigidBody_Dynamic>();
|
||||
if (nullptr != m_LockOnInfo.pUnit) {
|
||||
vDir = XMVector3Normalize(m_LockOnInfo.pUnit->Get_LockOnPos() - m_pGrapInteractive->Get_LockOnPos());
|
||||
}
|
||||
else {
|
||||
vDir = m_pTransformCom->Get_State(STATE::LOOK);
|
||||
}
|
||||
m_pGrapInteractive->Set_KinematicFlag(false);
|
||||
pBody->Add_Force(vDir * vDistance, PSX::PxForceMode::eIMPULSE);
|
||||
SAFE_RELEASE(m_pGrapInteractive);
|
||||
}
|
||||
|
||||
void CPlayer::Add_FSM()
|
||||
{
|
||||
#pragma region Behavior_Movement_NotFocus
|
||||
|
||||
@@ -10,11 +10,6 @@ class CCamPosition_Shoulder final : public CCamPosition
|
||||
public:
|
||||
typedef struct tagCameraShoulder_Desc : public CCamPosition::CAMERAPOSITION_DESC
|
||||
{
|
||||
_float fMouseSensor = { 0.5f };
|
||||
_float fShoulderDistance = { 2.f };
|
||||
_float fBackFrontRatio = { 0.9f };
|
||||
_float fCameraFocalLength = { 10.f };
|
||||
_float3 vInitialLook = { 1.f, 2.f, -1.f };
|
||||
}CAMERA_SHOULDER_DESC;
|
||||
private:
|
||||
CCamPosition_Shoulder(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
@@ -27,7 +22,7 @@ class CCamPosition_Shoulder final : public CCamPosition
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
_vector Get_ShoulderLocalPos();
|
||||
_vector Get_ShoulderGlobalPos();
|
||||
|
||||
|
||||
private:
|
||||
@@ -35,35 +30,44 @@ class CCamPosition_Shoulder final : public CCamPosition
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
HRESULT Ready_Components(void* pArg);
|
||||
HRESULT Ready_SubParts();
|
||||
void Start_LerpShoulderPos();
|
||||
_float Calc_CamPosRatio();
|
||||
_vector Calc_LookTargetPos();
|
||||
_vector Calc_FollowTargetPos(_vector vLookTargetWorldPos);
|
||||
|
||||
_bool m_bMovable = { true };
|
||||
_float m_fMouseSensor = { 0.5f };
|
||||
_float m_fShoulderDistance = { 2.f };
|
||||
_float m_fCameraFocalLength = { 10.f };
|
||||
_float3 m_vBackFrontRatio = { 0.9f, 0.9f, 0.9f }; // 시작위치, 대상위치, 원래위치
|
||||
_float2 m_vAccDegreeXY = {};
|
||||
_float3 m_vShoulderPosRatio = { 1.f, 2.f, -1.f };
|
||||
_float m_fMouseSensor = { 0.1f };
|
||||
_float m_fCameraFowardDistance = { 3.45f };
|
||||
_float m_fCameraBarrelLength = { 10.f };
|
||||
_float2 m_vFocalRatio = { 0.f, 0.467f };
|
||||
_float m_fHeadHeight = { 1.61f };
|
||||
_float m_fFollowTargetIncludedAngleDegree = { 20.f };
|
||||
_float m_fDefaultCameraBackToFrontRatio = { 0.61f };
|
||||
_float2 m_vAccRotDegrees = { 0.f, 0.f };
|
||||
_float3 m_vShoulderLocalPos = { 1.f, 2.f, 2.f };
|
||||
|
||||
_float3 m_vShoulderStartRatio = { 1.f, 2.f, -1.f };
|
||||
_float3 m_vShoulderOtherRatio = { 1.f, 2.f, -1.f };
|
||||
#pragma region Lerp
|
||||
_bool m_bShoulderLerp = false;
|
||||
_bool m_bRightShoulderActive = true;
|
||||
_float2 m_vShoulderLerpTimer = { 0.f, 0.30f };
|
||||
|
||||
_bool m_bShoulderLerp = { false };
|
||||
_float2 m_vShoulderLerpTimer = { 0.f, 1.f };
|
||||
// Lerp 각도
|
||||
_float2 m_vShoulderLerpDegree = { };
|
||||
_float2 m_vShoulderLerpIncludedAngleDegree = { -20.f, 20.f };
|
||||
|
||||
_float m_fFocalRatioTargetValue = 0.f;
|
||||
_float m_fFocalRatioLerpSpeed = 6.f;
|
||||
_float m_fFocalRatioMin = 0.05f;
|
||||
#pragma endregion
|
||||
|
||||
_float2 m_vPosLerpTimer = { 0.f, BASIC_LERP_TIMER };
|
||||
_float4 m_StartPos = { };
|
||||
_float4 m_DestPos = { };
|
||||
PSX::PxSweepBuffer m_BufferHit = {};
|
||||
|
||||
_bool m_bZoomIn = { false };
|
||||
_bool m_bLerp = {};
|
||||
_bool m_bMovable = { true };
|
||||
|
||||
|
||||
CCamPosition_Target* m_pTarget_LookPart = { nullptr };
|
||||
CCamPosition_Target* m_pTarget_FollowPart = { nullptr };
|
||||
class CCamera_Gaze* m_pBinded_Camera = { nullptr };
|
||||
const _float4* m_pParentPos = { nullptr };
|
||||
CTransform* m_pLookTransform = { nullptr };
|
||||
CTransform* m_pFollowTransform = { nullptr };
|
||||
CCamPosition_Target* m_pTarget_LookPart = { nullptr };
|
||||
CCamPosition_Target* m_pTarget_FollowPart = { nullptr };
|
||||
class CCamera_Gaze* m_pBinded_Camera = { nullptr };
|
||||
|
||||
public:
|
||||
static CCamPosition_Shoulder* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
|
||||
@@ -119,7 +119,9 @@ class CEffectObject abstract : public CPartObject
|
||||
_float4 vDissolveColor = {};
|
||||
_float2 vDissolveColorCut = {};
|
||||
|
||||
_float3 vPadding1 = {};
|
||||
_float fEmissiveColorCut = {};
|
||||
|
||||
_float2 vPadding1 = {};
|
||||
_float4 vNoiseColor = {};
|
||||
_float4 vPadding3 = {};
|
||||
_float4 vPadding4 = {};
|
||||
|
||||
@@ -39,9 +39,11 @@ class CGoblin final : public CMonster
|
||||
CRigidBody_Dynamic* m_pRigidBody = { nullptr };
|
||||
_float2 m_vStunTimer = { 0.f, 4.f };
|
||||
_uint iIndex;
|
||||
|
||||
private:
|
||||
class CEffectPool* m_pEffectPool = nullptr;
|
||||
DAMAGE_INFO m_DamageInfo;
|
||||
|
||||
|
||||
class CEffectParts* m_pSmoke = { nullptr };
|
||||
class CEffectParts* m_pGoblin_Particle = { nullptr };
|
||||
class CEffectParts* m_pGoblin_Particle2 = { nullptr };
|
||||
|
||||
@@ -26,6 +26,7 @@ class CGoblin_BattleAxe final : public CPartObject
|
||||
virtual HRESULT Render() override;
|
||||
HRESULT Render_Disolve();
|
||||
void Set_Disolve(_bool bDisolve) { m_bDisolve = bDisolve; }
|
||||
const _float4x4 Get_AxeMatrix() { return m_vAxeMat; };
|
||||
public:
|
||||
|
||||
private:
|
||||
@@ -35,6 +36,7 @@ class CGoblin_BattleAxe final : public CPartObject
|
||||
_bool m_bDisolve = { false };
|
||||
_float m_fDisolveTime = { 0.f };
|
||||
|
||||
_float4x4 m_vAxeMat= {};
|
||||
|
||||
private:
|
||||
HRESULT Ready_Components();
|
||||
|
||||
@@ -160,7 +160,7 @@ class CPlayer final : public CUnit
|
||||
|
||||
|
||||
void Player_InterpTurn(_float fTimeDelta);
|
||||
|
||||
void Throwing_Interactive();
|
||||
#pragma endregion
|
||||
|
||||
private:
|
||||
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 4.0 MiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -150,4 +150,64 @@
|
||||
<Surface>SRO</Surface>
|
||||
</Mesh>
|
||||
</SM_OakTree_TallA>
|
||||
<SM_Reeds_A_Master mesh="1">
|
||||
<Mesh>
|
||||
<Material>T_Reeds_D</Material>
|
||||
<Material>T_Reeds_N</Material>
|
||||
<Material>T_Reeds_SRO</Material>
|
||||
<Surface>SRO</Surface>
|
||||
</Mesh>
|
||||
</SM_Reeds_A_Master>
|
||||
<SM_Reeds_B_Master mesh="1">
|
||||
<Mesh>
|
||||
<Material>T_Reeds_D</Material>
|
||||
<Material>T_Reeds_N</Material>
|
||||
<Material>T_Reeds_SRO</Material>
|
||||
<Surface>SRO</Surface>
|
||||
</Mesh>
|
||||
</SM_Reeds_B_Master>
|
||||
<SM_GenericShrub_B mesh="1">
|
||||
<Mesh>
|
||||
<Material>T_BogMyrtle_Leaves_D</Material>
|
||||
<Material>T_BogMyrtle_Leaves_N</Material>
|
||||
<Material>T_BogMyrtle_Leaves_SRO</Material>
|
||||
<Surface>SRO</Surface>
|
||||
</Mesh>
|
||||
</SM_GenericShrub_B>
|
||||
<SM_BogMyrtle_A mesh="1">
|
||||
<Mesh>
|
||||
<Material>T_BogMyrtle_Leaves_D</Material>
|
||||
<Material>T_BogMyrtle_Leaves_N</Material>
|
||||
<Material>T_BogMyrtle_Leaves_SRO</Material>
|
||||
<Surface>SRO</Surface>
|
||||
</Mesh>
|
||||
</SM_BogMyrtle_A>
|
||||
<SM_Dogwood_B mesh="2">
|
||||
<Mesh>
|
||||
<Material>T_Dogwood_Leaves_02_D</Material>
|
||||
<Material>T_Dogwood_Leaves_02_N</Material>
|
||||
<Material>T_Dogwood_Leaves_02_SRO</Material>
|
||||
<Surface>SRO</Surface>
|
||||
</Mesh>
|
||||
<Mesh>
|
||||
<Material>T_Dogwood_Bark_D</Material>
|
||||
<Material>T_Dogwood_Bark_N</Material>
|
||||
<Material>T_Dogwood_Bark_SRO</Material>
|
||||
<Surface>SRO</Surface>
|
||||
</Mesh>
|
||||
</SM_Dogwood_B>
|
||||
<SM_ScotsPine_LargeA_Master mesh="2">
|
||||
<Mesh>
|
||||
<Material>T_ScotsPine_Branch_D</Material>
|
||||
<Material>T_ScotsPine_Branch_D</Material>
|
||||
<Material>T_ScotsPine_Branch_D</Material>
|
||||
<Surface>SRO</Surface>
|
||||
</Mesh>
|
||||
<Mesh>
|
||||
<Material>T_ScotsPine_Bark_A_D</Material>
|
||||
<Material>T_ScotsPine_Bark_A_N</Material>
|
||||
<Material>T_ScotsPine_Bark_A_SRO</Material>
|
||||
<Surface>SRO</Surface>
|
||||
</Mesh>
|
||||
</SM_ScotsPine_LargeA_Master>
|
||||
</Instance>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -687,12 +687,12 @@ PS_OUT_BLUR_X PS_MAIN_BLUR_X(PS_IN In)
|
||||
float2 vTexcoord;
|
||||
float4 vColor = 0.f;
|
||||
|
||||
for (int i = -31; i < 32; ++i)
|
||||
for (int i = -15; i < 16; ++i)
|
||||
{
|
||||
vTexcoord.x = In.vTexcoord.x + (float) i / g_vResolution.x;
|
||||
vTexcoord.y = In.vTexcoord.y;
|
||||
|
||||
vColor += g_fWeights_64[i + 31] * g_BlurTexture.Sample(ClampSampler, vTexcoord);
|
||||
vColor += g_fWeights_32[i + 15] * g_BlurTexture.Sample(ClampSampler, vTexcoord);
|
||||
}
|
||||
|
||||
Out.vBlurX = vColor;
|
||||
@@ -871,12 +871,12 @@ PS_OUT_BLUR_X PS_MAIN_BLUR_Y(PS_IN In)
|
||||
float2 vTexcoord;
|
||||
float4 vColor = 0.f;
|
||||
|
||||
for (int i = -31; i < 32; ++i)
|
||||
for (int i = -15; i < 16; ++i)
|
||||
{
|
||||
vTexcoord.x = In.vTexcoord.x;
|
||||
vTexcoord.y = In.vTexcoord.y + (float) i / g_vResolution.y;
|
||||
|
||||
vColor += g_fWeights_64[i + 31] * g_BlurTexture.Sample(ClampSampler, vTexcoord);
|
||||
vColor += g_fWeights_32[i + 16] * g_BlurTexture.Sample(ClampSampler, vTexcoord);
|
||||
}
|
||||
|
||||
Out.vBlurX = vColor;
|
||||
|
||||
@@ -154,6 +154,7 @@ float4 g_vDissolveColor;
|
||||
float2 g_vDissolveColorCut;
|
||||
|
||||
float4 g_vNoiseColor;
|
||||
float g_fEmissiveColorCut;
|
||||
|
||||
struct VS_IN
|
||||
{
|
||||
@@ -483,7 +484,7 @@ float4 DrawEffect(PS_IN In)
|
||||
float2 vDissolveUV = In.vTexcoord + SelectLerpUV(g_vDissolveUVGainAmount, (vDissolveUVMoveTime.x / vDissolveUVMoveTime.y), 0);
|
||||
|
||||
if (g_isDissolveMove)
|
||||
vMtrlDissolve = g_DissolveTexture.Sample(DefaultSampler, vDissolveUV);
|
||||
vMtrlDissolve = g_DissolveTexture.Sample(DefaultSampler, vDissolveUV );
|
||||
else
|
||||
vMtrlDissolve = g_DissolveTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
@@ -552,13 +553,22 @@ float4 DrawEffect(PS_IN In)
|
||||
return vMtrlDiffuse;
|
||||
}
|
||||
|
||||
float4 EmissiveDraw(PS_IN In)
|
||||
float4 EmissiveDraw(PS_IN In , float4 Diffuse)
|
||||
{
|
||||
float4 vEmissiveMtrl = vector(0.f, 0.f, 0.f, 0.f);
|
||||
float2 CenteredUV = In.vTexcoord - 0.5f;
|
||||
float fEmissive = 0.f;
|
||||
float fEmissiveStrength = g_fEmissiveStrength;
|
||||
|
||||
if (g_fEmissiveColorCut >= FLT_EPSILON5)
|
||||
{
|
||||
if (g_fEmissiveColorCut > length(Diffuse.rgb))
|
||||
{
|
||||
return vEmissiveMtrl;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (g_fRadius >= FLT_EPSILON5)
|
||||
{
|
||||
float fDistance = saturate(length(CenteredUV) / g_fRadius); // 마스크의 크기를 어느정도할지
|
||||
@@ -639,7 +649,7 @@ PS_OUT PS_MAIN(PS_IN In)
|
||||
|
||||
vMtrlDiffuse = DrawEffect(In);
|
||||
|
||||
vMtrlDiffuse.rgb += EmissiveDraw(In).rgb;
|
||||
vMtrlDiffuse.rgb += EmissiveDraw(In, vMtrlDiffuse).rgb;
|
||||
|
||||
Out.vDiffuse = vMtrlDiffuse;
|
||||
|
||||
@@ -663,7 +673,7 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
|
||||
if (fDepthStencilValue <= In.vProjPos.z / In.vProjPos.w + fbias)
|
||||
discard;
|
||||
|
||||
vMtrlDiffuse.rgb += EmissiveDraw(In).rgb;
|
||||
vMtrlDiffuse.rgb += EmissiveDraw(In, vMtrlDiffuse).rgb;
|
||||
|
||||
Out = BlendedWeight(vMtrlDiffuse, In.vProjPos.w);
|
||||
|
||||
@@ -744,7 +754,8 @@ PS_BLUR_OUT PS_BLUR_NOEMISSIVE(PS_IN In)
|
||||
//// 색깔 추가할 처리 (이미시브)
|
||||
|
||||
vMtrlDiffuse.a *= 5.f;
|
||||
|
||||
|
||||
vMtrlDiffuse.a = saturate(vMtrlDiffuse.a);
|
||||
//if (g_isDissolve == true)
|
||||
//{
|
||||
// if (g_isNomalDissolve)
|
||||
@@ -769,6 +780,8 @@ PS_BLUR_OUT PS_BLUR(PS_IN In)
|
||||
|
||||
vMtrlDiffuse.a *= 5.f;
|
||||
|
||||
vMtrlDiffuse.a = saturate(vMtrlDiffuse.a);
|
||||
|
||||
//// 색깔 추가할 처리 (이미시브)
|
||||
|
||||
//vMtrlDiffuse.rgb += EmissiveDraw(In).rgb;
|
||||
@@ -805,7 +818,7 @@ PS_BLOOM_OUT PS_BLOOM(PS_IN In)
|
||||
|
||||
//// 색깔 추가할 처리 (이미시브)
|
||||
|
||||
vMtrlDiffuse.rgb += EmissiveDraw(In).rgb;
|
||||
vMtrlDiffuse.rgb += EmissiveDraw(In, vMtrlDiffuse).rgb;
|
||||
|
||||
float fBloomStrength = g_fBloomStrength;
|
||||
|
||||
@@ -837,7 +850,7 @@ PS_BLOOM_OUT PS_BLEND(PS_IN In)
|
||||
|
||||
vMtrlDiffuse = DrawEffect(In);
|
||||
|
||||
vMtrlDiffuse.rgb += EmissiveDraw(In).rgb;
|
||||
vMtrlDiffuse.rgb += EmissiveDraw(In, vMtrlDiffuse).rgb;
|
||||
|
||||
Out.vDiffuse = vMtrlDiffuse;
|
||||
|
||||
@@ -852,7 +865,7 @@ PS_BLOOM_OUT PS_WEIGHTED_FOR_BLEND(PS_IN In)
|
||||
|
||||
vMtrlDiffuse = DrawEffect(In);
|
||||
|
||||
vMtrlDiffuse.rgb += EmissiveDraw(In).rgb;
|
||||
vMtrlDiffuse.rgb += EmissiveDraw(In, vMtrlDiffuse).rgb;
|
||||
|
||||
Out.vDiffuse = BlendedWeight(vMtrlDiffuse, In.vProjPos.w).vDiffuse;
|
||||
|
||||
|
||||
@@ -553,6 +553,8 @@ void CEditEffect::Describe_Entity()
|
||||
GUI::DragFloat("CoreBoost", &m_EffectInfo.fCoreBoost, 0.005f);
|
||||
GUI::DragFloat("SoftStrength", &m_EffectInfo.fSoftStrength, 0.005f);
|
||||
GUI::DragFloat("SoftenExp", &m_EffectInfo.fSoftenExp, 0.005f);
|
||||
GUI::DragFloat("EmissiveColorCut", &m_EffectInfo.fEmissiveColorCut, 0.005f);
|
||||
|
||||
ImGui::PopItemWidth();
|
||||
|
||||
GUI::ColorEdit4("Emissive", (_float*)&m_EffectInfo.vEmissive);
|
||||
@@ -563,6 +565,7 @@ void CEditEffect::Describe_Entity()
|
||||
GUI::Checkbox("EmissiveDissolve", &m_EffectInfo.isEmissiveDissolve);
|
||||
GUI::Checkbox("EmissiveDissolveReverse", &m_EffectInfo.isEmissiveDissolveReverse);
|
||||
|
||||
|
||||
if (m_EffectInfo.isEmissive)
|
||||
{
|
||||
if (GUI::TreeNode("EMISSIVE_TEX"))
|
||||
|
||||
@@ -985,8 +985,11 @@ HRESULT CEffectObject::Bind_ShaderResources()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fEmissiveColorCut", &m_EffectInfo.fEmissiveColorCut, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (m_pDiffuse_TextureCom != nullptr)
|
||||
|
||||
@@ -47,8 +47,8 @@ HRESULT CEffectPool::Initialize(void* pArg)
|
||||
//if (FAILED(Ready_Effect()))
|
||||
// return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_MonsterEffect()))
|
||||
return E_FAIL;
|
||||
//if (FAILED(Ready_MonsterEffect()))
|
||||
// return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ void CInstancedProp::Update(_float fTimeDelta)
|
||||
m_pVIBufferInstanceCom->Add_Instance(m_pTransformCom->Get_XMWorldMatrix());
|
||||
m_pVIBufferInstanceCom->Update_Instance();
|
||||
|
||||
m_vRotation.y = m_pGameInstance->Random_Float(0.f, 360.f);
|
||||
m_vRotation.y = m_pGameInstance->Real_Random_Float(-360.f, 360.f);
|
||||
m_vScale.y = m_pGameInstance->Random_Float(0.8f, 1.2f);
|
||||
|
||||
_float3 vPosition = {};
|
||||
@@ -369,7 +369,7 @@ void CInstancedProp::Describe_Entity()
|
||||
|
||||
m_pTransformCom->Set_Scale(m_vScale);
|
||||
//m_pTransformCom->Set_State(STATE::POSITION, XMLoadFloat4(&m_vPosition));
|
||||
//m_pTransformCom->Rotation(XMConvertToRadians(m_vRotation.x), XMConvertToRadians(m_vRotation.y), XMConvertToRadians(m_vRotation.z));
|
||||
m_pTransformCom->Rotation(XMConvertToRadians(m_vRotation.x), XMConvertToRadians(m_vRotation.y), XMConvertToRadians(m_vRotation.z));
|
||||
|
||||
m_pVIBufferInstanceCom->Fix_Instance(m_pTransformCom->Get_XMWorldMatrix());
|
||||
if (GUI::Button("Delete", ImVec2(150.f, 30.f)))
|
||||
|
||||
@@ -231,7 +231,7 @@ HRESULT CLevel_MapViewer::Ready_Layer_InstanceProp(const _wstring& strLayerTag)
|
||||
/* Oak_Tree */
|
||||
Desc.bEditMode = false;
|
||||
Desc.isShake = true;
|
||||
Desc.vRadius = _float2(0.015f, 0.04f);
|
||||
Desc.vRadius = _float2(0.015f, 0.03f);
|
||||
Desc.vSpeed = _float2(0.3f, 1.f);
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_SM_OakTree_MedA";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/OakTree_MedA.bin";
|
||||
@@ -330,14 +330,54 @@ HRESULT CLevel_MapViewer::Ready_Layer_InstanceProp(const _wstring& strLayerTag)
|
||||
|
||||
/* OakTree_TallA */
|
||||
Desc.bEditMode = false;
|
||||
Desc.isShake = true;
|
||||
Desc.vRadius = _float2(0.f, 0.01f);
|
||||
Desc.vSpeed = _float2(0.01f, 0.1f);
|
||||
Desc.isShake = false;
|
||||
Desc.vRadius = _float2(0.01f, 0.01f);
|
||||
Desc.vSpeed = _float2(0.01f, 0.021f);
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_OakTree_TallA";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/OakTree_TallA.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &Desc)))
|
||||
return E_FAIL;
|
||||
|
||||
/* Shrub_B */
|
||||
Desc.bEditMode = false;
|
||||
Desc.isShake = true;
|
||||
Desc.vRadius = _float2(0.015f, 0.04f);
|
||||
Desc.vSpeed = _float2(0.3f, 1.f);
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_Shrub_B";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Shrub_B.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &Desc)))
|
||||
return E_FAIL;
|
||||
|
||||
/* BogMyrtle_A */
|
||||
Desc.bEditMode = false;
|
||||
Desc.isShake = true;
|
||||
Desc.vRadius = _float2(0.015f, 0.04f);
|
||||
Desc.vSpeed = _float2(0.3f, 1.f);
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_BogMyrtle_A";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/BogMyrtle_A.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &Desc)))
|
||||
return E_FAIL;
|
||||
|
||||
/* Dogwood_B */
|
||||
Desc.bEditMode = false;
|
||||
Desc.isShake = true;
|
||||
Desc.vRadius = _float2(0.015f, 0.02f);
|
||||
Desc.vSpeed = _float2(0.3f, 1.f);
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_Dogwood_B";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/Dogwood_B.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &Desc)))
|
||||
return E_FAIL;
|
||||
|
||||
/* ScotsPine_LargeA */
|
||||
Desc.bEditMode = false;
|
||||
Desc.isShake = false;
|
||||
Desc.vRadius = _float2(0.015f, 0.02f);
|
||||
Desc.vSpeed = _float2(0.3f, 1.f);
|
||||
Desc.strPrototypeTag = L"Prototype_Component_VIBuffer_Model_Instancel_ScotsPine_LargeA";
|
||||
Desc.strInstanceDataPath = "../Bin/Resources/Data/Map/Instance/ScotsPine_LargeA.bin";
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CInstancedProp>(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &Desc)))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -3251,8 +3251,32 @@ if(isLoad_Map)
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_OakTree_TallA*/
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_OakTree_TallA"),
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,&InstanceDesc,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_OakTree_TallA.fbx", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_OakTree_TallA.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_Shrub_B*/
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_Shrub_B"),
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_GenericShrub_B.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_BogMyrtle_A*/
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_BogMyrtle_A"),
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_BogMyrtle_A.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_Dogwood_B*/
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_Dogwood_B"),
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_Dogwood_B.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_Component_VIBuffer_Model_Instancel_ScotsPine_LargeA*/
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Model_Instancel_ScotsPine_LargeA"),
|
||||
CVIBuffer_Model_Instance::Create(m_pDevice, m_pContext,
|
||||
"../Bin/Resources/Models/InstanceProp/SM_ScotsPine_LargeA_Master.bin", "../Bin/Resources/Data/Map/Instance/InstanceMaterial.xml"))))
|
||||
return E_FAIL;
|
||||
#pragma endregion // INSTANCE_MODEL
|
||||
|
||||
|
||||
@@ -45,9 +45,12 @@ HRESULT CTerrain::Initialize(void* pArg)
|
||||
//m_pVIBufferCom->Set_CullingRadius(0.04f);
|
||||
|
||||
if(!m_isEdit)
|
||||
{
|
||||
m_pAlphaMap->Load_ToFile("Hogsmeade_AlphaMap.bin");
|
||||
|
||||
|
||||
if (FAILED(m_pVIBufferCom->Load_HeightMap("Hogsmeade_HeightMap.bin")))
|
||||
return E_FAIL;
|
||||
}
|
||||
// Psx 적용할지 안할지
|
||||
m_bUsePsx = true;
|
||||
|
||||
|
||||
@@ -119,7 +119,9 @@ class CEffectObject abstract : public CPartObject
|
||||
_float4 vDissolveColor = {};
|
||||
_float2 vDissolveColorCut = {};
|
||||
|
||||
_float3 vPadding1 = {};
|
||||
_float fEmissiveColorCut = {};
|
||||
|
||||
_float2 vPadding1 = {};
|
||||
_float4 vNoiseColor = {};
|
||||
_float4 vPadding3 = {};
|
||||
_float4 vPadding4 = {};
|
||||
|
||||
@@ -687,12 +687,12 @@ PS_OUT_BLUR_X PS_MAIN_BLUR_X(PS_IN In)
|
||||
float2 vTexcoord;
|
||||
float4 vColor = 0.f;
|
||||
|
||||
for (int i = -31; i < 32; ++i)
|
||||
for (int i = -15; i < 16; ++i)
|
||||
{
|
||||
vTexcoord.x = In.vTexcoord.x + (float) i / g_vResolution.x;
|
||||
vTexcoord.y = In.vTexcoord.y;
|
||||
|
||||
vColor += g_fWeights_64[i + 31] * g_BlurTexture.Sample(ClampSampler, vTexcoord);
|
||||
vColor += g_fWeights_32[i + 15] * g_BlurTexture.Sample(ClampSampler, vTexcoord);
|
||||
}
|
||||
|
||||
Out.vBlurX = vColor;
|
||||
@@ -871,12 +871,12 @@ PS_OUT_BLUR_X PS_MAIN_BLUR_Y(PS_IN In)
|
||||
float2 vTexcoord;
|
||||
float4 vColor = 0.f;
|
||||
|
||||
for (int i = -31; i < 32; ++i)
|
||||
for (int i = -15; i < 16; ++i)
|
||||
{
|
||||
vTexcoord.x = In.vTexcoord.x;
|
||||
vTexcoord.y = In.vTexcoord.y + (float) i / g_vResolution.y;
|
||||
|
||||
vColor += g_fWeights_64[i + 31] * g_BlurTexture.Sample(ClampSampler, vTexcoord);
|
||||
vColor += g_fWeights_32[i + 16] * g_BlurTexture.Sample(ClampSampler, vTexcoord);
|
||||
}
|
||||
|
||||
Out.vBlurX = vColor;
|
||||
|
||||
Reference in New Issue
Block a user