Created
June 5, 2019 09:49
-
-
Save todorok1/889ea7006ce6ccfef5eaf79978b88b31 to your computer and use it in GitHub Desktop.
スポットライトをターゲットに向けるスクリプト
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <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