Moving Game Objects

I’m very new when it comes to unity and I need some help when it comes moving game objects. I want a game object to randomly spawn in a certain area and be able to move on its own in one direction. I have the “moving on its own” part figured out, but the game object will start out slow and increasingly get faster. I want the game object to stay at the same speed the entire time from the moment it is spawned. Any help or ideas on this? The code I used for the object to move is the following:

rigidbody.AddForce(new Vector3(0, 50, 0) * Time.deltaTime);

Please respond with anything that may be of use

The problem is that adding a force will increase the velocity EVERY time the code runs. You can simply set the velocity in the start method:

void Start() {
    rigidbody.velocity = new Vector3(0f, 50f * Time.deltaTime, 0f);
}
1 Like

Thanks that worked!! Sorry i’m obviously new and i’m still learning!