Ways to instancing of scenes and moving

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By ddenis.sdv

Hello people.
I just started learn Godot and i want to make simple game.
Now, i need to create a grid 6x6 with blocks and move to upward them smoothly. Wherein i need to create new row of blocks under that grid and that it was happened constantly. That is moving up then new row under them, moving up → new row.!

with this code that i writed myself:

for(int i = 0; i < row; i++)
        for(int j = 0; j < col; j++)
            int rndColor = rnd.Next(3);
            PackedScene rect = rectArray[rndColor];
            rectInstance = (RigidBody2D)rect.Instance();
            rectInstance.Position = new Vector2(SpawnPosX * i + 200, SpawnPosY * j + 360);


But if i trying move the blocks then only last block is moved.
How is better to make what i want? Sorry for my English.

could you please show a screenshot or picture of exactly what’s happening and what do you want to achieve?

asetyowatir | 2020-10-19 02:39