- Home /

# How much force do I need to add to a rigidbody with a certain mass to hit a certain speed ?

Hello. I'm making an Aircraft simulation with Unity based on the cessna skylane (or 182). The maximum speed of this plane is 296 km/h and his weight is 894 kg. I need to know how much force( and by force I mean the thrust) i need to add to the rigidbody which represents the plane to hit those 296 km/h. I wasn't able to find this info on Google. So I need to search it myself but I have no idea how to do it! I thought I could use a code like that :

```
Rigidbody x;
if(x.velocity.magnitude == 296)
{
// Save the thrust force at the rigidbody hit that speed
}
```

Knowing that I use this code to add Thrust:

```
if(Input.GetKey(KeyCode.UpArrow))
{
thrustForce = thrustForce + 15f;
x.AddRelativeForce(Vector3.forward * thrustForce * Time.deltaTime, ForceMode.Acceleration);
}
if (Input.GetKeyUp (KeyCode.UpArrow))
{
thrustForce = 0;
}
```

Please help me.

(Sorry if there are some mistakes I'm not a native speaker)

This sounds like a physics question?! If you want to know the force you will need to use some equations! Firstly F = ma (Force is equal to mass * acceleration,you probably want momentum though). So, p = mv (momentum = mass * velocity) in your case p = 894 * 82.22 (296km/h in m/s) = 78868.68 kgm s-1. Also F = p/t (Force = momentum divided by time) in your case the force needed per second = 78868.68 / 1 = 78868.68 kgm =(N/s)

I think this is correct although you might want to check this yourself as I'm a bit rusty at this stuff ([equations][1])

Edit: this is presuming you want the thrust force [1]: http://physics.info/equations/

Well, I wanted to do it that way first but I don't the level for that. I was blocked at the F = m*a, but now I'm not anymore. Thanks. I would also want to know if x.velocity.magnitude is in m.s-1 ?

Just to be clear, assuming that the `Rigidbody.drag`

is 0 (no [air?] resistance) and that there are no other forces acting on it, adding a relative force F would effectively set the net force to F. Since acceleration a is equal to F/m and the mass m is a constant 894 kg, the acceleration would be proportional only to the force F you add using `Rigidbody.AddRelativeForce`

—meaning that constantly adding force would theoretically give the plane infinite speed, or at least the maximum possible values for velocity, thus your value of 78868.68 N would theoretically cause the plane to reach 296 km/h in one second, then continue to accelerate the plane until the force is no longer applied. My guess is that a plane should not accelerate by 80+ m/s in one second, and should not reach infinite speed, so if you want a constant force to add, you would need some kind of speed-dependent limiting factor which increases as speed increases—drag. Drag should resist movement: the faster the plane, the stronger the drag. Past a certain speed, your drag will be greater than your thrust, meaning that (without gravity) there would be no way to accelerate past that speed.

Flight simulators get complicated when it comes to the physics, and I don't know how the Unity engine calculates drag based on the `Rigidbody.drag`

value, so I would suggest making a custom calculation for it. To calculate the thrust to apply to the plane, try to find the measured maximum acceleration for the plane when it is on the ground, since drag does not significantly affect acceleration at low speeds. Then, play around with the numbers in the drag equation until the maximum speed your `Rigidbody`

achieves without gravity or friction is approximately 82. Since the drag equation is pretty complicated, I normally simplify it to something like `float dragForce = k*speed*speed`

.

yeah sorry forgot to mention drag. (although the question only asked force needed so I assumed the rest and just used the equation). Although surely if there is no air resistance you would only need to apply 788.....N to the plane and it will reach the required velocity(?) therefore you would only need to apply this force once (for one second) and the plane should carry on at that velocity?

**Answer** by Bunny83
·
Jul 10, 2016 at 05:28 AM

The answer is: Without drag it doesn't matter. Any non zero force will get you there since there are no "counter forces".

If you have set a drag value for your rigidbody you can calculate the max velocity for a given force / acceleration.

Read my answer over here carefully. Unity doesn't simulate realistic air friction / air resistance. Unity's "drag" is just a generic **linear** counter force while real air resistance is a quadratic force. Real air resistance depends on may factors.

I've also added a method that can calculate the required drag for a given acceleration and max velocity.

Just in case that's not clear:

```
force = acceleration * mass
```

likewise

```
acceleration = force / mass
```

The problem is that I use drag to slow down the plane which was set to one by default. I need to use it to be realistic even the unity drag is not really accurate from a physic point of view.

Have you actually read my other answer that i linked above? If you have a drag value set you can use my "GetRequiredAcceleraton" method to calculate how much acceleration you need in order to reach a certain velocity. If you have the acceleration you simply need to multiply it by the objects mass to get the required force. That's why i mentioned that relation in my answer.

well surely the amount of drag at max speed should equal the thrust force

**Answer** by TheFish657
·
Jul 09, 2016 at 01:03 PM

i would use some log statements and Rigidbody.velocity just to have a look

What's a log statement ? I looked on Google and I didn't really get a clear idea.

### Your answer

### Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.