Repair ribbon hole
The intention of those mini tutorials is to have simply searchable reference for the implementation of primary concepts in Niagara.
At the moment I need to have a fast take a look at how we would clear up a standard problem when utilizing Ribbons.
Except you spawn a particle each single body, there’ll all the time be a spot between the supply of the ribbon and the ribbon itself.
Spawning a particle each body, could be a resolution in some instances, nevertheless it’s typically higher to discover a resolution in which you’ll bridge that hole
There are just a few methods to take care of this, however I’d wish to current a reasonably primary one that may work in numerous conditions.
Fundamental Setup
The technique right here might be to reliably discover the final spawned particle and snap it to our supply location (the emitter place on this instance).
We do that by, for each particle, evaluating the index of that particle with the full variety of particles which were spawned within the emitter. Within the case that we do have the final spawned particle, we set the Place of the particle to the simulation place.
Now to know the full variety of particles we nonetheless have to hold observe of that by some means.
To do that, we’ll regulate the SpawnPerUnit and SpawnRate modules. (You’ll most likely need to create a replica for this.)
On the finish of the modules we are able to add slightly part that reads the spawn depend and provides it to Emitter.TotalParticlesSpawned.
And growth now the final particle of your ribbon will stay connected to the supply.
Besides that’s not fully the case.
Resulting from tick order it’s attainable that this script might be executed earlier than the motion script of the supply.
This may create a one body hole between the final particle and the supply.
We will clear up this on a case by case foundation, by forcing the Niagara Tick to later within the body.
That is usually ailing suggested as a result of it takes away the engines capacity to utilize threading in an environment friendly method, but when used sparingly it may be useful.
And there you go, a fairly sturdy approach to make your ribbons gap-less.
Take pleasure in.