How does roblox's Particle Emitter Drag affect the Acceleration of the particle? Is there a way to trace the path?

I’ve previously posted about calculating the velocity needed for a particle to reach a certain distance when Drag is taken into account

After days of research and revisiting calculus problems, I came up with the equation I was looking for, but unfortunately this equation only works for CONSTANT speed, and doesn’t quite trace the roblox particle well when it takes Acceleration into account.

Roblox uses this equation to get the ratio at a specific elapsed time that the particle’s initial velocity should be scaled by when there is Drag:

function ratio(t, d)
return 2^-dt

where t = elapsed time, d = drag

And one can draw the path the particle should rise in (disregarding any vector values and only using scalar) with this following equation:
f(x) = 1/2 * a * x^2
where f(x) is the velocity/distance at the specific time, given “a” which is the scalar acceleration value.

How does roblox combine those two functions to simulate the path their particles travel in for Acceleration when there’s Drag?
I tried to multiply f(x) by r(x) which should calculate the velocity over time, and with a part, you can offset it’s current position by that value to trace the Particle, but the paths don’t seem to match at all.

If the velocity of a particle at any given time is found through v(t)=2 ^{-Dt}(v_i+at) where v_i is the initial velocity, D is the drag (constant), and t is time in seconds, then taking the integral of the function should yield a function s(t) which returns the position given time.


Solving for v_i, we get this:


Given the following:
a = acceleration
D = drag
s = position/displacement from particle emitter
t = time to take in seconds

the function will return the required velocity for a particle to move s studs away from the particle emitter in t seconds.

DISCLAIMER: I haven’t tested this, I just did the calculus. No guarantees that it works in Roblox, but let me know how it goes :slight_smile:



This is marvelous!

Thank for your such cleanliness and precision walking me through your solution; I’ve been getting into integrals (self teaching myself calculus) & I understood your approach and as to why you used the integral terms for this case.
Unfortunately although everything checks out with the given inputs and equation, it does not trail the position relative to the graph’s inputs on Roblox with an actual Particle Emitter.

I guess where my problem resides is that I don’t really know the equation roblox uses to update the velocity over time when accounting for acceleration

After looking at a Roblox Particle Emitter with Drag of 10, Initial Speed of 0, and Acceleration of (0, 10, 0), the particle seems to rise very fast, and then decrease the rate of it’s velocity (impacted by Drag):

Drag = 0
Drag = 10

Is there any way to calculate that motion completely disregarding initial velocity, and only the change in velocity from the scalar acceleration which in my case, is 10?