# Resolved Particle spread when rotating

Discussion in 'Visual Effect Graph' started by plehannowww, Apr 14, 2022.

1. ### plehannowww

Joined:
Nov 10, 2020
Posts:
10
Hello! I have blood effect that must throwing particles in front line. It work only when Y angle is 0,90,180 etc, but when rotating is 1-89 effects have spread. Why?

File size:
299.6 KB
Views:
371
File size:
64.2 KB
Views:
377
File size:
63.9 KB
Views:
238

### Unity Technologies

Joined:
Sep 16, 2016
Posts:
549
Hi @plehannowww ,

Not quite sure what's happening, will share with the team after the Easter holiday to take a look. In the meantime, you can use a Set Velocity from Direction & Speed (New Direction) block, and then add some random velocity after to increase the spread a bit:

#### Attached Files:

• ###### Unity_NauMZHa36m.gif
File size:
3.5 MB
Views:
214
plehannowww likes this.
3. ### Qriva

Joined:
Jun 30, 2019
Posts:
804
Isn't that caused by the fact you are doing this per component?
For instance if there is
``Set Velocity Random``
with:
• A = (0, 0, 0)
• B = (0, 0, 1)
They are transformed by object rotation (45 deg), so vector A is still zero, but vector B will be (0.707, 0, 0.707), so you get random numbers between 0 and 0.707 on X and Z axis. When you do this per component it means you randomize separately for XYZ and in result you might get vectors like:
• (0, 0, 0.7)
• (0.7, 0, 0)
• (0.7, 0, 0.7)
Try uniform mode so one random number is "scaling" the vector and you should get vectors like:
• (0.1, 0, 0.1)
• (0.35, 0, 0.35)
• (0.7, 0, 0.7)
However personally I prefer Vlad's method most of the time (set from direction) as it works well with Set Position Shape blocks.

Last edited: Apr 16, 2022
4. ### plehannowww

Joined:
Nov 10, 2020
Posts:
10

@Qriva, I hope that I understand your explanation and i think it looks true, but even with Vlad`s version it looks like:

### Unity Technologies

Joined:
Sep 16, 2016
Posts:
549
Hey @plehannowww ,

Try changing the 7 here to a 1:

You are setting the directionality with the Set Velocity from Direction & Speed block, if you need it to go faster increase the Speed value there. The Add Velocity below it is to introduce a bit of a spread.

#### Attached Files:

File size:
10.8 KB
Views:
195
Qriva and plehannowww like this.
6. ### plehannowww

Joined:
Nov 10, 2020
Posts:
10
I needed to inscrese lenght of blood, like green box on the screen, because i tried to changed Z to 7. Then i changed speed, as you adviced me, and added Random Number to increase lenght of blood and it works! Now there is no spreading when I rotating the player. Thank you!

Joined:
Sep 16, 2016
Posts:
549