Exemplo n.º 1
0
    private void Dot()
    {
        Vector3 dir = target.position - transform.position;

        Vector3 normalizedA = BasicMath.Normalize(transform.up);
        Vector3 normalizedB = BasicMath.Normalize(dir);

        Debug.Log(BasicMath.Dot(normalizedA, normalizedB));
    }
Exemplo n.º 2
0
    private void MoveToTarget()
    {
        Vector3 dir = target.position - transform.position;

        transform.position += (Vector3)BasicMath.Normalize(dir) * speed * Time.deltaTime;
    }