I am a first time programmer watching a tutorial on making a 2d, top-down game. The tutorial is slightly outdated but only by a couple years, so I assume that it would work the same. My goal for this specific section of code is just to make the player look left when A is pressed and look right when D is pressed. Right now, nothing happens, but I don't see any errors in the console.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class player : MonoBehaviour
{
private BoxCollider2D boxCollider;
private Vector3 moveDelta;
private void Start()
{
boxCollider = GetComponent<BoxCollider2D>();
}
private void FixedUpdated()
{
float x = Input.GetAxisRaw("Horizontal");
float y = Input.GetAxisRaw("Vertical");
//Reset moveDelta
moveDelta = new Vector3(x, y, 0);
//Swap sprite direction for left or right
if (moveDelta.x > 0)
transform.localScale = Vector3.one;
else if (moveDelta.x < 0)
transform.localScale = new Vector3(-1, 1, 1);
}
}
Do I have a setting on Unity wrong, or is there just an error in my code?
The tutorial I'm following is "Learn Unity Engine and C# by creating a real top down RPG" on Udemy and I don't see anyone else having the same problem.
Any help is appreciated :)

FixedUpdatedcalled?FixedUpdate