XRoom_Unity/Assets/connectToFace.cs

19 lines
432 B
C#
Raw Normal View History

2025-05-31 06:50:20 +00:00
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);
}
}