Skip to content

Instantly share code, notes, and snippets.

@matt123miller
Last active October 5, 2016 11:59
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 matt123miller/6b553385a76a9f68efd9d71817f85fc4 to your computer and use it in GitHub Desktop.
Save matt123miller/6b553385a76a9f68efd9d71817f85fc4 to your computer and use it in GitHub Desktop.
// Logic created by @DanInFiction on Twitter, I stole it to make an extension method.
using UnityEngine;
using System.Collections;
public static class LookAt2D_Extension {
public static void LookAt2D(this Transform self, Transform target){
self.right = target.position - self.position;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment