Hi guys, I am novice to the Unity Engine. I am trying to create cube that fly on the Upward direction by using
void Update()
{
rigidbody.AddForce(Vector3.up * 0.5F, ForceMode.Acceleration);
}
This code makes the cube fly. And I am able to clone the Cube by using Instantiate function. My doubt is How can I Make the Clone of Cube and make them fly upwards by specific time Interval. (Basically I need the Instance of cube appears on Camera after every 5 seconds). Additionally if there is any Collision with Other Objects (Other than cubes), How can I destroy the exact Instance of Cube instead of all.
Helps will be appreciated. Thanks in Advance.