# How to determine the min force to apply to a bodythrust to make it's parent move?

I a am working on a chassis, and right now it uses velocity to move. Velocity is not bad, but I want to make my chassis drive with bodythrusts. Is there any math equation(s) I can use to determine the minimum force to apply to the bodythrust to make the car move?

I posted this in scripting support, since I need help with an eqaution, not a design / build.

1 Like

We can use iterate GetMass() through the entire carâ€™s Parts using the For loop. To get the car Modelâ€™s Parts you would do:
local tableofkids = Model:GetDescendants()
To check if the Instance is a Part and not some other Model or Constraint. Use if checks.
Once you get the mass of all of them, you should add them to get a total mass.
This is where it gets sciency. Roblox-wise since real world equations break down. Give me some time to find ratios and create equations.

1 Like

Omg thanks sooo much I have had this issue for a long time, and I am glad to get this over with !

Most numbers are rounded down or up to make it easier. Also, my tests were conducted sloppily but I still tried hard and even did multiple tests.

1 S/s^2) (studs per second per second) is the acceleration for a 1 RM (RoMass, my term) object assuming no outside forces and the Force is 0, 1, 0.

So, to make something with a mass of 100 RoMass go 45 S/s^2, you would need 4500 units of Force.

a = intended acceleration in Studs per second per second
m = mass of object you want to move
F = force

F = ma

Doglord120 facepalms

But, after melting my brain even more, I found that there is such thing as inertia in Roblox even in 0 G environment and without friction. This is the true amount of Force to get something to accelerate constantly. Inertia = ma. But I scrapped that and found out that in Roblox you could just do Inertia = Mass. Our little example up there would yield an Inertia factor of around 100. 100 units of Force, this is the true amount you need to move something with 100 RoMass. I say around because 90 units of Force didnâ€™t work but 95 and above worked.

Good luck! Hope this helps. Also, PM for questions. And anybody out there who knows a lot more about classical physics stuff and Roblox mechanics, please correct me where you find necessary. And if I were to factor in friction, itâ€™s a whole 'nother can of worms. So, if you want me to, Iâ€™ll try.

1 Like

If there is no friction acting on your vehicle, then any amount of force will cause it to move. However, since there does exist friction on ROBLOX, then there is going to be a minimum force before you overcome static rolling friction. Calculating this static friction mathematically on ROBLOX is hard (due to the engine being weird). If you have multiple vehicles of different weight, but relatively similar geometry, you can then calculate some sort of ratio needed to calculate minimum force. For a car, keep incrementing the force until it starts to move slowly. Then calculate the coefficent via force/weight of the car. Now, if you have a car of a different mass, you can multiple the coefficient by that cars mass to calculate an approximate minimum force to move the car. This works if the rolling friction law implemented by ROBLOX is linear (which it probably wonâ€™t be over a large span of weight values). If you are really bored, you could take multiple data-points and curve fit via polynomial regression.

If you are really set on controlling your cars speed via thrust forces, look into implementing some sort of control law. This will control the thrust in a manner which overcomes unmodeled (or modeled) disturbances in order to achieve your cars desired speed.

Could you show me an example script with the math equations?

Friction shouldnâ€™t be a problem because if you are trying to make a realistic car. Friction will be a problem that the player will have to overcome, not the dev. If you make a car and it drives perfectly on clean road, it shouldnâ€™t adjust to working just the same as on a bumpy road. The player should have to pedal the car more to add more force to get the car to accelerate. And no, I tested it. In a frictionless, gravity-less test, amounts of Force below the approximated inertia factor do not move things. It will snap back to a velocity of 0.

Iâ€™ll try to show an example in a script soon.

1 Like