Rotate GameObject doesn't work

Salut baieti,
Vreau să-mi arunc mașina cu fața la următorul punct, pentru că a durat mult timp până se va roti singur.

Ma poti ajuta?
Aici este codul meu.

 private void FindFirstRoute(List<Route> routes)
    {

        int j = Random.Range(0, routes.Count - 1);
        _currentRoute = new Route(routes[j]);
        Vector3 spawnPoint = new Vector3();
        spawnPoint = _currentRoute.Nodes[0].Point;
        spawnPoint.y += 2;
       
        transform.position = spawnPoint;

        var direction = _currentRoute.Nodes[1].Point - _currentRoute.Nodes[0].Point;
        transform.rotation = Quaternion.LookRotation(direction);
        transform.eulerAngles = new Vector3(0f, transform.eulerAngles.y, 0f);

    }

Lines 13 and 14 won’t work. transform.eulerAngles is going to sometimes give you angles that you think should just be simple Y rotations, but Unity stores rotation as Quaternions and converts them to eulerAngles as needed. So sometimes for an angle which could be expressed as just a Y rotation you’ll instead see rotations around all 3 axis, and just taking the Y rotation and setting the rest to 0 will not result in the rotation you are looking for.