Hey I need some help with this sample Unity script, I know nothing about coding and just need an object to move over to another object, except I don’t know what to add to this script:
using UnityEngine;
using System.Collections;
public class ExampleClass : MonoBehaviour {
public Transform target;
public float speed;
void Update() {
float step = speed * Time.deltaTime;
transform.position = Vector3.MoveTowards(transform.position, target.position, step);
}
}
Any help would be appreciated thanks.