top of page

TOSHICHAN
Unityでスクリプト&簡単な実装サイト
指定したオブジェクトを向く
public Transform Target;
public float Speed = 0.1f;
void Update ()
{
transform.rotation = Quaternion.Slerp (transform.rotation, Quaternion.LookRotation (Target.position- transform.position),Speed);
}
bottom of page