17 lines
405 B
C#
17 lines
405 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class TargetFollower : MonoBehaviour
|
|
{
|
|
public Transform kasi;
|
|
public Transform kaesolevAsi;
|
|
public float kiirus;
|
|
|
|
public void FixedUpdate()
|
|
{
|
|
if (kaesolevAsi == null) return;
|
|
kaesolevAsi.position = Vector3.Lerp(kaesolevAsi.position, kasi.position, kiirus * Time.deltaTime);
|
|
}
|
|
}
|