How do i make bullet vehicle move to waypoint

Every time i run this code my vehicle ends up going straight and then in circles, i cant find a way to avoid this, so any help would be appreciated.

    def AIPath(self):
        self.AIworld = AIWorld(render)
        # model_name: str, model_np: NodePath, mass: float, movt_force: float, max_force: float
        self.AICar = AICharacter("AInp", self.AInp, 100, 0.05, 5)
        self.AIworld.addAiChar(self.AICar)
        self.AIbehaviors = self.AICar.getAiBehaviors()
        # random.randint(-80, 80) on nodes
        self.waypoint = self.loader.loadModel("models/box")
        self.waypoint.reparentTo(render)
        self.waypoint.setPos(-20, 25, -1)
        # self.waypoint.hide()
        # Path follow (note the order is reversed)
        self.AIbehaviors.pathFollow(1.0)
        self.AIbehaviors.addToPath(self.waypoint.getPos())
        self.AIbehaviors.seek(self.waypoint.getPos())
        self.AIbehaviors.startFollow()
        # AI World update
        taskMgr.add(self.AIUpdate, "AIUpdate")
        taskMgr.add(self.steerAI, "steerAI")
        # to update the AIWorld

    def AIUpdate(self, task):
        self.AIworld.update()
        #self.steerAI()
        return Task.cont

    def steerAI(self, task):
        engineForce = 1300.0
        brakeForce = 0.0
        self.AIvehicle.applyEngineForce(engineForce, 2)
        self.AIvehicle.applyEngineForce(engineForce, 3)
        self.AIvehicle.setBrake(brakeForce, 2)
        self.AIvehicle.setBrake(brakeForce, 3)


        #print(self.AInp.getY())
        #print(self.AInp.getX())
        if self.waypoint.getY() + 2 > self.AInp.getY() > self.waypoint.getY() - 2:
            self.AIsteering = 0
            self.AIsteering = max(self.AIsteering, -self.AIsteeringClamp)
            self.AIvehicle.setSteeringValue(self.AIsteering, 0)
            self.AIvehicle.setSteeringValue(self.AIsteering, 1)
            if self.waypoint.getX() + 2 > self.AInp.getX() > self.waypoint.getX() - 2:
                self.waypoint.setPos(random.randint(-80, 80), random.randint(-80, 80), -1)
                # left X
            elif self.waypoint.getX() < self.AInp.getX():
                    self.AIsteering += self.dt * self.AIsteeringIncrement
                    self.AIsteering = min(self.AIsteering, self.AIsteeringClamp)
                    self.AIvehicle.setSteeringValue(self.AIsteering, 0)
                    self.AIvehicle.setSteeringValue(self.AIsteering, 1)
                # right X
            elif self.waypoint.getX() > self.AInp.getX():
                    self.AIsteering -= self.dt * self.AIsteeringIncrement
                    self.AIsteering = max(self.steering, -self.AIsteeringClamp)
                    self.AIvehicle.setSteeringValue(self.AIsteering, 0)
                    self.AIvehicle.setSteeringValue(self.AIsteering, 1)
            # right Y
        elif self.waypoint.getY() < self.AInp.getY()+5:
            if self.seconds<5:
                self.AIsteering += self.dt * self.AIsteeringIncrement
                self.AIsteering = min(self.AIsteering, self.AIsteeringClamp)
                self.AIvehicle.setSteeringValue(self.AIsteering, 0)
                self.AIvehicle.setSteeringValue(self.AIsteering, 1)

            # left Y
        elif self.waypoint.getY() > self.AInp.getY()-5:
                self.AIsteering -= self.dt * self.AIsteeringIncrement
                self.AIsteering = max(self.steering, -self.AIsteeringClamp)
                self.AIvehicle.setSteeringValue(self.AIsteering, 0)
                self.AIvehicle.setSteeringValue(self.AIsteering, 1)
        return Task.cont

It is obvious that the wheels should be turned towards the point. This can be done using mathematics. Something like the lookAt method.

Does that look at method have to use camera or can I use the node itself?

I would attach empty nodes to the point of attachment of the axes, and apply lookAt to the destination point, then used the degree.

Yes, you can do anything through the node. You just have to choose the axis to match the model and the bullet.

Only, as far as I remember, this method is only applicable to the NodePath type. That’s why I suggest hanging up empty nodes.