示例#1
0
    // Update is called once per frame
    void FixedUpdate()
    {
        //print(transform.eulerAngles.z); //we can use the eueler angle z value to determine facing, use facing to determine how to navigate car
        print(destination.name);
        //update facing
        updateFacing();
        //navigate towards destination
        //first check if we are alligned with destination, if not steer car car

        //steer
        correction();
        //drive
        car.Forward();
        //car.transform.position += new Vector3(-0.5f, 0, 0) * Time.deltaTime;
    }