Skip to content

Instantly share code, notes, and snippets.

@todorok1
Created June 5, 2019 09:49
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 todorok1/889ea7006ce6ccfef5eaf79978b88b31 to your computer and use it in GitHub Desktop.
Save todorok1/889ea7006ce6ccfef5eaf79978b88b31 to your computer and use it in GitHub Desktop.
スポットライトをターゲットに向けるスクリプト
/// <Summary>
/// スポットライトをtargetの方向に向ける
/// </Summary>
public class SpotlightController : MonoBehaviour{
public GameObject target;
void Start(){
}
void Update(){
transform.LookAt(target.transform.position);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment