Unity 2d A* Pathfinding cant get negative x velocity
im making a script about a topdown 2d car Ai Movement to move around the city randomly via waypoint using A* and the part of that script is to change thing like the waypoint scan range(collider offset) and the animtion to match the the car direction, then right,up,down direction work fine but left didnt work
void UpdateDirectionAndAnimation(Vector3 desiredVelocity)
{
bool isHorizontal = Mathf.Abs(desiredVelocity.x) > Mathf.Abs(desiredVelocity.y);