2D Grid Macro position finder

Hey all,

I am using the 2D Grid Macro to spawn a grid of vertical cylinders Blueprints, where each of them has another 2D Macro to spawn another Blueprint of a light-cube,

the result looks like this:

This is my BP to spawn the cylinders:

and within each cylinder there is this BP to spawn the light cubes:

Now I am using a timeline to turn the light cubes on/off in various ways.

I made sure to catalog each Blueprint with its relative position (I think), my current goal is to light up the cubes from inwards outwards,

So I have to calculate for each lightcube Blueprint its relative position in the on-off timeline. For some patterns it’s easy to calculate like up-down or left-right,
but to calculate inwards/outwards I am a bit stuck.

Is there an efficient way to calculate this?
My controls are
1- Tube amount (equal x/z tubes)
2- Light Cube amount (spawns on the Y axis)

Thanks a lot in advance


1 Like

Hola :slight_smile:

They’re blueprints, right? Why not each BP to calculate it’s distance from the center, just using the distance vector node?

1 Like

Sounds perfect actually, how would one use that in this case?
My timeline is 1 second, so I will need to calculate the distance and turn that into a relative position from 0-1 where 0 is the closest to the center, 1 is the furthest?

Is it a central timeline, or does each have it’s own?

What’s supposed to happen? At 0 only the center ones lit, and at 1 only the outer ones?

Each BP has its own timeline.

So the position of that cube’s timeline should be from 0-1, 0=the closest cubes to the center, 1= the furthest

Then I suppose I’ll get this effect of the cubes turn on/off in chase mode, outwards

Thanks as always :slight_smile:

Something along these lines


1 Like

Amazing! thank you so much, I just adapted it to the Set Playback Position method, so they all run at the same time,

Here is the result:

Thank you so much :slight_smile: much easier this way !

Hang on, not quite right…

Yes, that’s what I meant, playback position :slight_smile:

1 Like

perfect, I just added the clamp node cause I needed the result to be 0-1, as my timeline is 1 second.

You are always to the rescue :slight_smile: thank you

1 Like

Of course, you’re right. It was just a general concept :smiley:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.