|
using UnityEngine;
|
|
|
|
public class FollowTransform : MonoBehaviour {
|
|
public Transform TargetTransform { get; set; }
|
|
|
|
private void LateUpdate() {
|
|
if (TargetTransform is null) return;
|
|
|
|
transform.position = TargetTransform.position;
|
|
transform.rotation = TargetTransform.rotation;
|
|
}
|
|
} |