Skip to content

Instantly share code, notes, and snippets.

@Naphier
Created October 11, 2015 16:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Naphier/76b9256d0946a73f60a6 to your computer and use it in GitHub Desktop.
Save Naphier/76b9256d0946a73f60a6 to your computer and use it in GitHub Desktop.
Draws rotated transform handles for a game object
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