돌진베기 완료

This commit is contained in:
Ino 2025-05-03 07:12:43 +09:00
parent 3c36331a8b
commit 698a1e379e
4 changed files with 38 additions and 7 deletions

Binary file not shown.

View File

@ -79,7 +79,7 @@ BoxCollider:
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 3
m_Size: {x: 2.8939738, y: 3, z: 6.898247}
m_Size: {x: 2.8939738, y: 3.5, z: 6.898247}
m_Center: {x: -0.24211812, y: 0, z: 0.5121741}
--- !u!1001 &7992047011628252273
PrefabInstance:
@ -112,7 +112,7 @@ PrefabInstance:
- target: {fileID: 7202642212723441742, guid: 4288fa4a0d6d8f441a99a3067fdee9c4,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7202642212723441742, guid: 4288fa4a0d6d8f441a99a3067fdee9c4,
type: 3}

View File

@ -11,7 +11,6 @@ public class Skill_DashSlash : ProjectileBase
public override void Set(ProjectileData _data)
{
base.Set(_data);
transform.eulerAngles = new Vector3(0f, transform.eulerAngles.y, 0f);
go_effect.SetActive(false);
m_Collider.enabled = false;
_data.shooter.Set_Invisible(0.5f, () => { StartCoroutine(Co_Update()); });
@ -25,12 +24,17 @@ public class Skill_DashSlash : ProjectileBase
IEnumerator Co_Update()
{
m_ProjecTileData.shooter.Set_Warp(m_ProjecTileData.target.Get_PositionFoward(1f));
if (m_ProjecTileData.shooter.IsMainPC())
MyValue.m_RealCamera.Set_FollowTarget(m_ProjecTileData.target);
yield return new WaitForSeconds(0.5f);
go_effect.SetActive(true);
m_ProjecTileData.shooter.Set_Warp(m_ProjecTileData.target.Get_PositionFoward());
transform.position = m_ProjecTileData.shooter.Get_Center_position();
yield return new WaitForSeconds(0.25f);
transform.LookAt(m_ProjecTileData.target.transform);
transform.eulerAngles = new Vector3(0f, transform.eulerAngles.y, 0f);
m_ProjecTileData.shooter.Set_Invisible(2.5f, () =>
{
if (m_ProjecTileData.shooter.IsMainPC())
MyValue.m_RealCamera.Set_FollowTarget(null);
Off(true);
});

View File

@ -37,7 +37,7 @@ public class RealCamera : MyCoroutine
float OriminDistance, OrimaxDistance, OriDistanceUp, OricameraHeight;
private float HorizontalAxis, VerticalAxis;
int CamStatus = 1; // 0 초기, 1 평소, 2 건물 내부
int CamStatus = 1; // 0 초기, 1 평소, 2 followtarget 쿼터뷰
float DragEndTime;
GameObject godummy, gowitch;
List<Transform> list_tfCamactionTarget = new List<Transform>();
@ -45,6 +45,8 @@ public class RealCamera : MyCoroutine
bool islockTarget;
Transform tf_lockTarget;
Actor m_followTarget;
private void Awake()
{
OriminDistance = minDistance;
@ -97,6 +99,11 @@ public class RealCamera : MyCoroutine
cameraHeight = OricameraHeight;
}
}
public void Set_FollowTarget(Actor target)
{
m_followTarget = target;
CamStatus = target ? 2 : 1;
}
public void Add_CamActionTarget(Transform _target) { list_tfCamactionTarget.Add(_target); }
public void Set_LockTarget(Transform locktarget)
{
@ -189,7 +196,27 @@ public class RealCamera : MyCoroutine
}
else if (CamStatus == 1)
Update_Cam();
else if (CamStatus == 2)
{
if (m_followTarget == null) return;
// 팔로우 타겟 기준 위치 설정 (앞에서 약간 위)
Vector3 followOffset = m_followTarget.transform.position + m_followTarget.transform.right * CamStatus2_x +
Vector3.up * CamStatus2_up;
// 카메라 위치 보간
transform.position = Vector3.Lerp(transform.position, followOffset, Time.deltaTime * 5f);
// 타겟의 머리 또는 약간 위를 보도록 설정
Vector3 lookTarget = m_followTarget.transform.position + Vector3.up * CamStatus2_up;
// 회전도 자연스럽게 보간
Quaternion targetRot = Quaternion.LookRotation(lookTarget - transform.position);
transform.rotation = Quaternion.Slerp(transform.rotation, targetRot, Time.deltaTime * 5f);
}
}
public float CamStatus2_x = 4f;
public float CamStatus2_up = 1.4f;
void Start_Game()
{