|
| 26 Apr 2014 10:34 PM |
How can I use a script to determine the correct force to give to make a model fly, but make it controlled so that it doesn't fly too fast with BodyThrust? Thanks. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 27 Apr 2014 02:31 AM |
| http://wiki.roblox.com/index.php/GetMass_(Method) |
|
|
| Report Abuse |
|
|
|
| 27 Apr 2014 02:55 AM |
| Ok thanks, and then after get the mass, what should I use for the force for the BodyThrust? |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 27 Apr 2014 02:57 AM |
| http://wiki.roblox.com/index.php/Gravity |
|
|
| Report Abuse |
|
|
|
| 27 Apr 2014 03:05 AM |
| Ok thanks, and then what do I do after I got the gravity and the mass of the model? |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 27 Apr 2014 03:07 AM |
Lets say it needs gravity of 10 to be zero gravity Give it 0, gravity + 2.5, 0
(Our gravity in this case being 10) It would be going up at 2.5 the speed it would have fallen |
|
|
| Report Abuse |
|
|
|
| 27 Apr 2014 03:16 AM |
| Ok, so 2.5 would be the mass of the model? |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 27 Apr 2014 03:20 AM |
No I was using 10 as an example Just do this
local f = FORCE_NEEDED_FOR_0_GRAVITY
Blah.force = Vector3.new(0, (f + (f /4)), 0) |
|
|
| Report Abuse |
|
|
|
| 27 Apr 2014 03:40 AM |
| Ok, so If I had a Part that had a mass of 9.6, how would I make the part go to 0 gravity? |
|
|
| Report Abuse |
|
|
gijsbel11
|
  |
| Joined: 07 Feb 2009 |
| Total Posts: 4223 |
|
|
| 27 Apr 2014 04:36 AM |
if you read the wiki article you should've seen this :
BodyForce.force = Vector3.new(0, 196.2, 0) * part:GetMass()
so for 9.6 it would
BodyForce.force = Vector3.new(0, 196.2, 0)*9.6 |
|
|
| Report Abuse |
|
|
RoflBread
|
  |
| Joined: 18 Jun 2009 |
| Total Posts: 3803 |
|
|
| 27 Apr 2014 05:46 AM |
As for your original question, you can determine the 'speed' with Newtons first law:
Force = Mass * Acceleration, where you just plug in the values for the mass and acceleration you want. |
|
|
| Report Abuse |
|
|
|
| 27 Apr 2014 04:54 PM |
Nvm, I solved this question :P I solved my problem by using Force = Mass * Gravity to solve my problem on getting the part to float, then I added the amount of speed for the thrust. |
|
|
| Report Abuse |
|
|
| |
|