골드메탈님 뱀서 강의 따라하는중인데

플레이어 가로 세로 움직일때는 괜찮아요

근데 대각선으로 움직일때는 떨리면서 이동해요

이거 어떻게 고치는지 알려줄수있을까요?

2D 셀 애니메이션🏃제작하기 [유니티 뱀서라이크 03]

유니티에서 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로도 옮겨보고 다 했는데 왜 안되는지 모르겠어요...