골드메탈님 뱀서 강의 따라하는중인데
플레이어 가로 세로 움직일때는 괜찮아요
근데 대각선으로 움직일때는 떨리면서 이동해요
이거 어떻게 고치는지 알려줄수있을까요?

유니티에서 2D 애니메이션을 만드는 방법을 쉽게 설명한 강좌입니다. 플레이어 스프라이트는 4종류가 있으니 원하는 것으로 따라해보아요~?그리고 힘들게 만든 애니메이터를 재활용하는 방법까지 상세하게 소개해드리고 있습니다.📚 뱀서라이크 개발 채널https://www.youtube.c...
www.youtube.com
using System.Collections;
using System.Collections.Generic;
using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.InputSystem;
public class Player : MonoBehaviour
{
public float speed;
Vector2 inputVec;
Rigidbody2D rigid;
SpriteRenderer spriter;
Animator anim;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Awake()
{
rigid = GetComponent<Rigidbody2D>();
spriter = GetComponent<SpriteRenderer>();
anim = GetComponent<Animator>();
}
void FixedUpdate()
{
Vector2 nextVec = inputVec * speed * Time.fixedDeltaTime;
rigid.MovePosition(rigid.position + nextVec);
}
void OnMove(InputValue value)
{
inputVec = value.Get<Vector2>();
}
private void LateUpdate()
{
anim.SetFloat("Speed", inputVec.magnitude);
if (inputVec.x != 0) {
spriter.flipX = inputVec.x > 0;
}
}
}
이거는 플레이어 코드입니다.
지피티랑 구글링 해서
interpolate도 켜보고
update로도 옮겨보고 다 했는데 왜 안되는지 모르겠어요...
아 고쳤습니다 왜 맨날 질문글올리면 고쳐지는지
픽셀 퍼펙트 카메라에 스냅핑 끄니까 해결되네요 역시 인디게임개발갤러리 검색해보는게 구글 서치보다 나은거같아요
근데 디시 검색이 ㅄ임
유니티 뮤즈 챗봇 사용만이 답이다