|
| 28 Mar 2012 05:40 PM |
If you haven't caught on yet, ROBLOX physics work as if everything is in a vacuum. Therefore, nothing has "terminal velocity" and acceleration and such isn't effected at all by air.
Does anyone know a basic equation to determine the opposite force due to air resistance for a cube of any size traveling at any velocity? |
|
|
| Report Abuse |
|
|
|
| 28 Mar 2012 05:47 PM |
| Well i'd love to help and all, but i'm terrible at this stuff. I will check back to this because i'm curious if anyone has an answer, as i've wondered this before myself. :) |
|
|
| Report Abuse |
|
|
mian
|
  |
| Joined: 05 Nov 2006 |
| Total Posts: 60 |
|
|
| 28 Mar 2012 05:48 PM |
f = 1/2 pv^2CA f is the force of drag, p is the density of the fluid (1.225 kg/m^3) V is the speed of the object relative to the fluid, C is the drag coefficient (a dimensionless parameter, e.g. 0.25 to 0.45 for a car) A is the reference area
Drag coefficients of various objects: sphere: 0.47 cube: 1.05. Pulled from wikipedia.
Sincerely, Mian |
|
|
| Report Abuse |
|
|
|
| 28 Mar 2012 05:49 PM |
WHY DOES MOTHER NATURE HAVE TO BE SO COMPLEX!?!
*ragequit* |
|
|
| Report Abuse |
|
|
| |
|
mian
|
  |
| Joined: 05 Nov 2006 |
| Total Posts: 60 |
|
|
| 28 Mar 2012 05:52 PM |
Fun fact:"C is not a constant but varies as a function of speed, flow direction, object position, object size, fluid density and fluid viscosity." :D
In other words, those constants weren't quite correct for spheres and cubes. You can use them anyway though.
Sincerely, Mian |
|
|
| Report Abuse |
|
|
|
| 28 Mar 2012 05:53 PM |
| Yeah, I'm going to use this for aircraft. I don't want to make the game have to make tons of small calculations, so I am going to take a relative size of the whole plane and act as if it is a giant box-shaped object. Maybe I'll divide the volume a bit for relevance. |
|
|
| Report Abuse |
|
|
mian
|
  |
| Joined: 05 Nov 2006 |
| Total Posts: 60 |
|
|
| 28 Mar 2012 05:55 PM |
You might want to set it alot lower though; planes are streamlined quite a bit. Perfectly streamlined bodies have ~0.04 C.
Sincerely, Noobertuber |
|
|
| Report Abuse |
|
|
Oysi
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|
mian
|
  |
| Joined: 05 Nov 2006 |
| Total Posts: 60 |
|
|
| 28 Mar 2012 05:56 PM |
What would be the fun of that?
Sincerely, Mian |
|
|
| Report Abuse |
|
|
|
| 28 Mar 2012 05:57 PM |
| These calculations would be running client-side, and probably would be recalculated every 0.1 seconds or something. No need to run them every frame. |
|
|
| Report Abuse |
|
|
|
| 28 Mar 2012 06:03 PM |
| I like this question, It is very interesting but I have no clue what the answer it could be. |
|
|
| Report Abuse |
|
|
Ozzypig
|
  |
| Joined: 27 Mar 2008 |
| Total Posts: 4906 |
|
|
| 28 Mar 2012 06:28 PM |
| Actually if you're going for planes, you want to use server-side calculations of drag. Unless your planes are flying client-side. |
|
|
| Report Abuse |
|
|
|
| 28 Mar 2012 06:31 PM |
Not sure if this will help, nor am I sure about the forces applied to an object that is not moving at constant velocity, but I do know when an object is moving at terminal velocity it's net force is 0.
Given it's net force is 0 that means the force pulling it forward is equal to the force pulling it backwards (Newtons 3rd law)
So if you wanted the force of an object traveling through air at terminal velocity you would just calculate the force at which it is moving forward, and it would be the same for the drag force.
Force = ObjectMass* Acceleration
Probably didn't help much. I tried.
|
|
|
| Report Abuse |
|
|
|
| 28 Mar 2012 08:05 PM |
| @Ozzypig - I run almost all stuff client-side when it comes to vehicles and such. Perilous Skies itself is all client-side, except for 1 or 2 server-side stuff that handle players entering and stat tracking/loading. |
|
|
| Report Abuse |
|
|
nightname
|
  |
| Joined: 10 Jun 2008 |
| Total Posts: 8960 |
|
|
| 29 Mar 2012 07:26 AM |
Its actually pretty simple. Here is how I would go about doing it:
local dx = 10; -- Delta x local dy = 10; -- Delta y local airFriction = 0.98; -- Friction from the air....
while true do wait(0.1); dx = dx*airFriction; dy = dy*airFriction; end
|
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 29 Mar 2012 08:08 AM |
Do something with the gravity of the object (196.2*basePart:GetMass).
I don't know any forumulars for calculating wind force based on velocity and mass.
The effect of creating wind would also be extremely laggy. Unless you wanted wind to effect players only. To do this, you would need to cast rays constantly to every unanchored object checking to see if nothing is blocking it from the wind. |
|
|
| Report Abuse |
|
|
nightname
|
  |
| Joined: 10 Jun 2008 |
| Total Posts: 8960 |
|
|
| 02 Apr 2012 02:36 PM |
"I don't know any forumulars for calculating wind force based on velocity and mass."
Air resistance is not the same as wind. As long as there is particles in the air, the drag force of them colliding with the object will be there.
Wind is just the air particles moving in a certain velocity. |
|
|
| Report Abuse |
|
|
Defendur
|
  |
| Joined: 31 Mar 2012 |
| Total Posts: 40 |
|
|
| 02 Apr 2012 04:26 PM |
@night
You can use it in the same manner. Velocity and mass could be changed to a high value, which indicates wind.
It could also be a lower value and represent wind at it's minimal, or in other words, air resistance. |
|
|
| Report Abuse |
|
|