Ln Go

Follow 본문

Unity/Quad Action

Follow

Ln Ro 2021. 6. 4. 02:24
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Follow : MonoBehaviour
{
    public Transform target;
    public Vector3 offset;
    //offset은 보정

    
    void Update()
    {
        transform.position = target.position + offset;
    }
}

'Unity > Quad Action' 카테고리의 다른 글

Shop  (0) 2021.06.04
Item  (0) 2021.06.04
StartZone  (0) 2021.06.04
Orbit  (0) 2021.06.04
Missile  (0) 2021.06.04
Comments