Skip to content

Instantly share code, notes, and snippets.

@tsubaki
Last active August 3, 2016 15:07
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 tsubaki/bb39f9ca49b79541518b6f1cd8df8240 to your computer and use it in GitHub Desktop.
Save tsubaki/bb39f9ca49b79541518b6f1cd8df8240 to your computer and use it in GitHub Desktop.
最も適当なルックアット
using UnityEngine;
using System.Collections;
public class SimpleLookat : MonoBehaviour {
// ゴール
[SerializeField] Transform target;
// カーソル
[SerializeField] Transform cursor;
// Update is called once per frame
void Update ()
{
cursor.LookAt (target);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment