Skip to content

Instantly share code, notes, and snippets.

Created April 17, 2013 10:37
Show Gist options
  • Save anonymous/5403320 to your computer and use it in GitHub Desktop.
Save anonymous/5403320 to your computer and use it in GitHub Desktop.
Test Vector3.Angle
using UnityEngine;
using System.Collections;
public class AngleTest : MonoBehaviour
{
public bool bangTest;
public Vector3 vector1;
public Vector3 vector2;
void Update () {
if (bangTest)
{
bangTest = false;
Debug.Log(Vector3.Angle(vector1, vector2));
Debug.DrawRay(Vector3.zero, vector1, Color.cyan, 5f);
Debug.DrawRay(Vector3.zero, vector2, Color.green, 5f);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment