Esempio n. 1
0
    private void Start()
    {
        //  currentLocation = this.transform.position;
        direction = fuel.transform.position - this.transform.position;
        Coords dirNormal = MathCalculations.GetNormal(new Coords(direction));

        direction = dirNormal.ToVector();

        float angle = MathCalculations.Angle(new Coords(0, 1, 0), new Coords(direction)) * 180.0f / Mathf.PI;

        Debug.Log("Angle to fuel = " + angle);

        //float angle1 = MathCalculations.Angle(new Coords(0, -2, 0), new Coords(-1, 2, 0)) * 180.0f / Mathf.PI;

        //float angle2 = MathCalculations.Angle(new Coords(0, -2, 0), new Coords(1, 2, 0)) * 180.0f / Mathf.PI;
        //Debug.Log("_____" + angle1);
        //Debug.Log("_____" + angle2);
    }