Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
スポットライトをターゲットに向けるスクリプト
/// <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
You can’t perform that action at this time.