Hi all,
I have a game where asteroid prefabs spawn at the top of the screen, but I want them to speed up over their lifetime. The script to move them is very simple.
Current code:
public class Mover : MonoBehaviour
{
public static float speed = -5f;
public Rigidbody rigidBody;
void Start()
{
rigidBody = GetComponent<Rigidbody>();
rigidBody.velocity = transform.forward * speed;
}
}
Please help.