PCG - How to use branch node?

Hi there!

I can not find the answer anywhere, so maybe someone here could help.

I am trying to do the following. I create some points > I filter some of them out > I want to check how many of them are there, so I use Get Number of Points node > I use Equal node to check if number of points is equal 1 > Depending on Equal results I would like to do A if true, or B if false.

My problem is that no matter what I do, Branch node passes data through both nodes. I even tried just Branch node and used flag inside the node (Output to B), chenged flag from False to True and back. Each time data goes through both outputs.

What am I doing wrong? How should I use Branch node? Should I use different node for this? Please help.

2 Likes

Now it works. It seems to be some kind of a bug. I lost few hours, I am no wiser, but it works… for now. What the hell. Is it some kind of memory leak or other engine issue? How to even debug it? I may be struggling for hours just to find the problem not existing after another restart.

Thanks for illustrating your code and flagging the potential for inconsistent execution. Luckily it worked first try for me.