Constrain particle location to curve

I’m trying to build a particle system in which the locations of the particles are constrained to a moving curve
f( u, v, w, t). The idea was to have t be randomly generated per-particle, and have an actor update the other variables over time.

I saw a question that said meshes could not be emitted along a predefined path, but since this is a bit different, I was hoping maybe there was a way of doing this. Unfortunately, I cannot find one.

Am I missing something, or is this just not feasible?

Hey player0 -

How are your creating your predefined path, is it a formula in C++ code or using a spline methodology in Cascade?

Thank You

Eric Ketchum

Hi player0 -

I am accepting this answer for tracking purposes if you still need assistance in this matter please feel free to comment back and we will continue looking into this effect for you.

Thank You

Eric Ketchum

Thanks for the reply Eric.

The curve isn’t actually defined anywhere explicitly- that’s kind of where I am stuck. What I have is three vector variables inside an actor blueprint, with the blueprint also containing a particle system component. I would like the particles spawned by this system to get their global position as a function of the three vectors and a random float.

Hi player0 -

If I am understanding you correctly. You will be using the three vectors to generate a curve and have the particle system randomly generate float value along the curve. And, ultimately the three vector values will be changing over a set amount of time?

Am I correct on this assumption? I believe that there is a way to do this but it will require a great deal of math.

Let me know if I am misunderstanding you request while I continue working on the math.

Thank You

Eric Ketchum

Yes, that is correct. Thanks.

It might be worth mentioning that I come from a pure math background. If I can get an idea of what math needs to be done, I can probably tackle it. (I’m assuming its just some linear algebra and vector calc. If its a PDE thing I take it back!)

Then again, these answer hubs are public for a reason, and it may be good to make sure the answer is understandable for anyone who reads this.

Hi Player0 -

Here it is. I used a Parametric Curve equation in doing this to avoid matrix math so the curve will not necessarily be as smooth as you might want it to be, the exact equation I based this off is found [here][1]. In this particular example, I set the 3 Interp Points to hard values to begin with along with setting t sub 1 to a hard value of 0.5 (which it should remain). I also have this example set up to move a mesh to a random point between the beginning and end of the curve, but this can easily be changed to a spawn emitter node and function the same. You should be able to develop the moving curve off of this blueprint example as the 3 points should always work in the equation as long as you are setting them to values before you run it. Finally I have a Random variable which is assigned randomly then used to keep the same random value (t) throughout the calculations.

I would love to see you final results when your done -

Eric Ketchum