Spawn over Distance seems to be linked to velocity ?

Hello everyone, I have two questions about the following graph, which kind of works, but with two unexpected behaviours :

  • The first one is that the Spawn over distance input seems to be linked to the object velocity. If it goes faster it clearly emits more particles, whereas it is my understanding that it should only be linked to the actual movement distance ? Since it is a bit of a problem in my situation, I’d like to fix it…

  • The second one is more something I don’t understand than an actual problem : as you can see I am lerping between the target position and the old position, so that it creates a continuous line. But I had to convert the target position to World Space (and not the oldPosition !) for it to work, which is very weird, why wouldn’t they be in the same Space ?

Thanks a lot for your help !!

Hi @VincentAbert ,

Can you repost the image? It doesn’t look like it attached correctly.
To your questions, yes, Spawn over Distance is spawning based on the distance traveled over a period of time.

If you want to spawn purely based on the distance between two positions, you can plug two Position or Vector3 properties into a Distance node, then multiply it by some rate, and use that as your Spawn Rate:

This way you will have a steady “density” of particles which will be uniform regardless of the distance between the two positions.

To your second question, I’m not really sure what’s happening, but target and old position should be in the same space.
If you have a small effect you can share which reproduces the issue, we can take a look.

6121727--667088--Ux0MDjylgl.gif

2 Likes

Hi, Are you setting the start position from a script?

In the example I shared we just have two inline Position operators and I’m moving one of them in the Scene view. No script. But yes, in a practical example you’d most likely want to expose the positions in Blackboard and set the values from script.

1 Like

Ah I see, makes sense. I forgot that there is gizmos! Thanks!

1 Like

Do you have an idea why this wouldn’t work for me? It doesn’t spawn anything at all:

7963704--1020879--sp.png
But the more interesting question is: Why do you see values in eg the position and capacity? I don’t see anything at all. Makes it very hard to find errors. How do you “debug” issues like that? Using 2022.1.0b10.

Hi @Rowlan ,

Both Position nodes you have are at (0,0,0), so your distance will be 0 and so will be your spawn rate.
Change one of your positions to be a different value so you get some distance between them.

Your system is in world space, while the operators you are connecting are in local space, so we display “-” to show that the values are being converted. If you set your system to Local space, or change your Position nodes and the Set Position (Shape:Line) block to be in World space (i.e. have everything in the same space) you should see the direct results as no space conversion is being done.

1 Like