SLEAPY_SMURF/Assets/Scripts/TargetFollower.cs

17 lines
405 B
C#
Raw Normal View History

2023-04-29 20:13:37 +00:00
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);
}
}