1. 캐릭터 조작을 멈췄을때 캐릭터가 빙판길에 있는 것 처럼 밀리는 현상 수정

2. 캐릭터 좌우키 동시 입력 시 바라보는 방향이 변경되지 않는 현상 수정
This commit is contained in:
Mingu Kim
2025-07-07 21:59:30 +09:00
parent 6db4dceac3
commit d18ffdaf1e

View File

@@ -30,11 +30,11 @@ public class PlayerMove : MonoBehaviour
// 키 입력 땔때 캐릭터 멈춤 // 키 입력 땔때 캐릭터 멈춤
if (Input.GetButtonUp("Horizontal")) if (Input.GetButtonUp("Horizontal"))
{ {
rigidBody.linearVelocity = new Vector2(rigidBody.linearVelocity.normalized.x * 0.5f, rigidBody.linearVelocity.y); rigidBody.linearVelocity = new Vector2(rigidBody.linearVelocity.normalized.x * 0.0000001f, rigidBody.linearVelocity.y);
} }
// 캐릭터(Sprite) 방향 // 캐릭터(Sprite)이동 방향 바라보도록 스프라이트 플립
if (Input.GetButtonDown("Horizontal")) if (Input.GetButton("Horizontal"))
{ {
spriteRenderer.flipX = Input.GetAxisRaw("Horizontal") >= 1; spriteRenderer.flipX = Input.GetAxisRaw("Horizontal") >= 1;
} }