Skip to content

Instantly share code, notes, and snippets.

@peroon
Created June 6, 2015 14:52
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 peroon/2f24d7dcf338efdbb1a3 to your computer and use it in GitHub Desktop.
Save peroon/2f24d7dcf338efdbb1a3 to your computer and use it in GitHub Desktop.
using UnityEngine;
using DG.Tweening;
public static class TransformExtensions
{
public static void SmoothLookAt(this Transform self, Vector3 pos, float time)
{
self.DORotate (Quaternion.LookRotation (pos).eulerAngles, time);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment