Course “Unity Visual Scripting” - Microbe Mayhem
Why does the course example work, when there is only one distance-variable?
All enemies share this same script graph and there is only one graph variable “distance”, correct ? And this distance-variable is shared by both enemies. So why is one enemy changing its direction and not the other enemy at the same time in the course example ?
I tried the multiply-approach, too, as shown in the picture below (changing only the y-value):
But this did not work properly. Here I have the effect, that both enemies change y-direction at the same time, when one collides.
So what is the difference, between using the “set variable” node and the “get variabe” and “set y” nodes ?
And why does the examples with the “set variable” node work, instead ?