2 using System.Collections;
6 public Transform target;
7 public bool copyX =
false;
8 public bool copyY =
false;
9 public bool copyZ =
false;
10 public float offsetX = 0f;
11 public float offsetY = 0f;
12 public float offsetZ = 0f;
15 Vector3 pos = transform.position;
17 pos.x = target.position.x + offsetX;
19 pos.y = target.position.y + offsetY;
21 pos.z = target.position.z + offsetZ;
22 transform.position = pos;