Why isn't amount of blocks always in the center? And how set it to the center?

Hello, I have one big problem with my game. I wanna blocks always in the center, when I change amount of blocks, ex. from 1010 it will be 55, or 3*3… but it should be always in the center of “background” behind blocks.

But now, here is problem.

10*10, it looks like in the center (on every side is same amount of the blocks)

5*5 it isn’t in the center (right and up sides are bigger than left and down sides)

My blueprint looks:
(PS: -2.2 is good for 1010 center, but no for 55, but IDK why, there is probably something wrong… for 55 is good 2.4 but it isn’t good for 1010, etc.)

Can someone help me solve it, please? I wanna it same (in the center) when I change amount of blocks…

If I were you, I’d look at this node:

This will speed up everything you do with grid patterns.

I have some issues with it. I am newbie, so IDK how exactly make it.

  1. I don’t have there Spawn Transform Location, Rotation and Scale as you.

  2. I don’t know how activate that function.

Disconnect the Transform, right click on it and split pin.

I don’t know how activate that

There is an execution wire in your screenshot, plug in there. It does not have to be in a loop or wrapped in a function.

With some small changes it worked, thanks!