캐릭터 좌우 이동 시 캐릭터 이미지 반전 적용

This commit is contained in:
aube.lee
2025-01-31 14:20:51 +09:00
parent f5741ba08f
commit faab1017ce

View File

@@ -44,6 +44,16 @@ namespace TON
// 디버그용 출력
// Debug.Log($"Horizontal Input: {horizontalInput}, Velocity: {rb.velocity}");
Turn(rb.velocity.x);
}
private void Turn(float direction)
{
var scale = transform.localScale;
scale.x = Mathf.Sign(direction) * Mathf.Abs(scale.x);
transform.localScale = scale;
}
public void Jump()