Neodroid  0.2.0
Machine Learning Environment Prototyping Tool
FollowTarget.cs
Go to the documentation of this file.
1 using UnityEngine;
2 
3 namespace droid.Runtime.Utilities.Misc.Orientation {
7  [ExecuteInEditMode]
8  public class FollowTarget : MonoBehaviour {
11  public Vector3 _Offset = new Vector3(0f, 7.5f, 0f);
12 
15  public Transform target;
16 
17  void LateUpdate() {
18  if (this.target) {
19  this.transform.position = this.target.position + this._Offset;
20  }
21  }
22  }
23 }