Created
October 11, 2015 16:20
-
-
Save Naphier/76b9256d0946a73f60a6 to your computer and use it in GitHub Desktop.
Draws rotated transform handles for a game object
This file contains 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; | |
public class ShowRotated : MonoBehaviour | |
{ | |
public void OnDrawGizmos() | |
{ | |
Gizmos.matrix = transform.localToWorldMatrix; | |
Gizmos.color = Color.blue; | |
Gizmos.DrawLine(Vector3.zero, Vector3.forward * 10f); | |
Gizmos.color = Color.red; | |
Gizmos.DrawLine(Vector3.zero, Vector3.right * 10f); | |
Gizmos.color = Color.yellow; | |
Gizmos.DrawLine(Vector3.zero, Vector3.up* 10f); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment