There is a problem that I haven't been able to solve for a few days, how do I clone the moving object and make the clone follow the original object letter by letter?There is a problem that I haven't been able to solve for a few days, how do I clone the moving object and make the clone follow the original object letter by letter?
This one main Instantiate
public static Instantiate Instance;
public Rigidbody Ball;
//FixedUpdate ile test et
private void Update()
{
if (Input.GetMouseButtonDown(0))
{
Rigidbody clone;
clone = Instantiate(Ball, transform.position, transform.rotation);
clone.velocity = transform.TransformDirection(Vector3.forward * 25);
}
}
this on clone
public Rigidbody Ball;
public Transform mainPos;
private void Update()
{
}
private void OnTriggerExit(Collider other)
{
if (other.CompareTag("Gate"))
{
Rigidbody clone2;
clone2 = Instantiate(Ball, mainPos.position, mainPos.rotation);
clone2.transform.parent = gameObject.transform;
}
}