XRoom_Unity/Assets/connectToFace.cs
2025-05-31 10:20:20 +03:30

19 lines
432 B
C#

using UnityEngine;
public class connectToFace : MonoBehaviour
{
// Start is called once before the first execution of Update after the MonoBehaviour is created
public Transform target;
void Start()
{
}
public float speed = 1f;
// Update is called once per frame
void Update()
{
transform.position=Vector3.Lerp(transform.position, target.position,speed*Time.deltaTime);
}
}