Created
April 17, 2013 10:37
-
-
Save anonymous/5403320 to your computer and use it in GitHub Desktop.
Test Vector3.Angle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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