Randomize the direction of a vector?
I have an emitter that emits papers. I want them to fly to different directions. To do that, I need to randomize the emission. I tried 3 signal generators combined into a 3-number wire, then into direction, but that doesnt work.
-
Hi,
What you're doing should work in theory.
The numbers on a direction vector wil be looking for -1 to +1 so make sure your signal generator is in that range.
I'll experiment in a bit and see if we can offer further insight
John -
I barely managed to make emission input transform work in another case, but there seems to be lack of syncing when at the same time you power the emission. I eventually dropped that approach and simply added all emission logic to each individual object (initally I wanted to have an emission control center that sends back the debris to the object that asks for them). Anyhow, regarding randomization, I love how Project Spark did it, it gave us access to a vector randomizer for a cone and sphere, and we also got to choose the axis (in local/world space). Would love to see the randomizer be able to handle vectors and colors, would be very useful.
-
I realized, 3 random vectors means a random sphere, I wanted a cone. I am not sure what math it needs tbh.
-
What if you attached an emitter to a sphere, and rotated the sphere randomly?
I probably could do it with math too, but this way sounds interesting. -
If you want a cone, just limit your signals, instead of having it go from -1 to 1, make a direction go from 0.3 to 1.
Making one value never reach negative makes the emission shape into a hemisphere; making the range smaller and closer to 1 will continue to limit that hemisphere until you're left with effectively a cone. -
Good to know, thanks Stanky.
Please sign in to leave a comment.