
Unity/Study2023. 11. 25. 17:00유니티 Input System을 활용한 캐릭터 회전 구현
📌 캐릭터 회전 구현탑다운 시점으로 캐릭터 회전을 구현한다. 마우스 바라보는 방향에 따라 플레이어 이미지 좌우 반전 📌 구현 목록 📄 PlayerInputController.cspublic void OnLook(InputValue value){ Vector2 newAim = value.Get(); Vector2 worldPos = _camera.ScreenToWorldPoint(newAim); newAim = (worldPos - (Vector2)transform.position.normalized); if (newAim.magnitude >= 0.9f) { CallLookEvent(newAim); }} 컨트롤러에 OnLook 매서드 추가마우스..