You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
342 B

  1. using System;
  2. using UnityEngine;
  3. namespace UnityStandardAssets.Utility
  4. {
  5. public class FollowTarget : MonoBehaviour
  6. {
  7. public Transform target;
  8. public Vector3 offset = new Vector3(0f, 7.5f, 0f);
  9. private void LateUpdate()
  10. {
  11. transform.position = target.position + offset;
  12. }
  13. }
  14. }