Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

in simple terms, what exactly is a BodyThrust ? and what is it for?

Asked by 4 years ago

I dont understand what the roblox docs say about it. Roblox Docs

0
i agree lol hakerethan 10 — 4y

1 answer

Log in to vote
1
Answered by
vexound 170
4 years ago
Edited 4 years ago

First of all we need to identify 2 key terms (I'm going to use simple definitions)

1) Force: The amount of push or pull on an object.

2) Torque: A twisting force on an object.

The equation for finding the torque of an object is: T = r*F*sin(?), where T is the torque, r is the radius, F is the force, and we can ignore the sin(?) part to make the explanation simpler.

What BodyThrust does is it exerts a force (F) on the parented part at a certain location. Essentially what happens is it creates torque which is being applied perpendicularly to the force. For example if you went into studio, and put a BodyThrust inside of a standard part with the force of (500,0,0) and the location of (0,0,1). The radius is half of 1, or 0.5, and the force is 500, producing a torque (radius*force) of 250. The force is being applied along the positive X-axis and the torque is being applied perpendicularly to this, so it would be applied to the positive Z-axis, as shown here, the motor represents the front of the part.

This causes the part to spin towards the motor and move upwards like this. If I were to change the location of the part to (0,0,-1) then the radius of the part would be negative, resulting in a negative torque. This would make the part spin away from the motor (because of a negative torque) and move upwards (thrust remains positive because it isn't being changed, only the radius is being changed which effects the torque) and would end up looking like this.

Just for fun, if we were to give the part a massive radius, the thrust would also be massive. So lets set the location to (0,0,500) and the force also to (0,0,500). This would mean it has a radius of 250 and a force of 500, resulting in a torque of 125000 which would put in simple terms, make it spin like crazy.

To sum it up, what BodyThrust does is spins the part towards the location and moves the part towards the force. Hope this helped and have a nice day!

0
sweet. Thanks User#23252 26 — 4y
Ad

Answer this question