Tracking Roblox Particles

Edit: Just as a disclaimer, this can change depending on how Roblox updates Particles in the future, but as of now it remains consistent. Eventually will include a dedicated update for more features on this hopefully due to the new wind feature for Particles.

  • Brief

I’ll be showing you how you can replicate the engine particle motions core essentials to use in applications that revolve around upmost performance, such as for projectiles or other niche cases.

To start with this I’ll only be detailing the process to the following particle motion factors, I wont go into detail for Velocity Inheritance & Wind & LockedToPart as they’re longer to explain and more intricate in behaviour, but these followings are the most commonly used in Particles across Roblox for VFX.

  1. Drag 2. Acceleration 3. Speed
  • What can we achieve with this?

So from my prior experience with this, it was the ability to make pure engine Particle rendered projectiles for a upcoming project, it’s used for custom physics collisions also and allows for mass rendering of projectiles and ParticleInstance:Emit(1) bypasses the LOD distance so we’re able to make great use of it, additionally setting the texture to a single pixel can be done if memory budget is a concern.


  • So lets get to the point!

Right, so the formula behind this isn’t complicated but this is what it boils down to, I’ll step by step point out what each variable means here, also take note this is iteratively stepped in code, there’s no closed form solution I’ve been able to figure and I believe that’s due to the Drag factor, however there’s always methods to approximate it if it’s such a requirement, though precision would be limited.

We first assign position to where the actual particle emitter emits from then we assign the initial velocity via

EmissionLocation:VectorToWorldSpace(Vector3.FromNormalId(ParticleEmitter.EmissionDirection)) * ParticleEmitter.Speed

Then finally in the iterative update we perform this to step the motion

		Position += Velocity * DeltaTime + Acceleration * (0.5 * DeltaTime ^ 2)	
		Velocity = (Velocity + Acceleration * DeltaTime) * 2 ^ (-Drag * DeltaTime)
  • Velocity * DeltaTime calculates the change in position due to the object’s initial velocity during the time step.

  • Acceleration * (0.5 * DeltaTime ^ 2) calculates the change in position due to the object’s acceleration during the time step.

  • 2 ^ (-Drag * DeltaTime) calculates the drag factor, which reduces the velocity due to drag during the time step

  • Multiplying the intermediate velocity by the drag factor gives the new velocity of the object, considering the drag’s decelerating effect.


  • Video demonstration & Reproduction place (You can download through Roblox)

In this video we show the repro place where we visualize attachments on the motion of the engines particles.

41 Likes

Very informative and useful resource. The bypassing of LOD limitations is especially impressive. Thank you for your contribution

2 Likes

does this work if particles have a randomised direction?

I don’t think so, since it uses the emission direction to predict the particle’s path.

You could always program your own code to randomize the direction and emit the particles one at a time as seen above.

1 Like