Control Array Count with empty

Hi guys,

I am trying to find a way to control Array modify Count parameter through distance from object to empty.
Say if empty is closer to object array count will be higher if it is further away array count is smaller.

Thank you

Try a driver:

This is just a simple one based off of the X position of the empty, but you can use “distance” instead, and you can do whatever kind of math you want instead of mine.

Thank you. Yes I found how to use driver based on empty position. Cant find a way to make it based of distance?

Never mind :)) Found it )) It is so cool

Ok it works great.
Can I add two empty objects? to control…

To control what?

Sorry, to control array count value. Currently I have one empty. Distance from empty to cube controls count value.

Say I want to have 2 or 3 empty objects…

Where I have empty towers are taller (array count is higher)

It is how it looks now.

I’m not sure what you’re saying.

If you want to control the distance of individual stacks using different empties, you just need to refer to a different empty in the driver for each. (Drivers aren’t linked-- you can edit them however you want. ro good or ill, editing one driver won’t edit any other driver.) Just click where it says “Object 1” in the driver editor and direct it to a different object.

If you want to drive the heights of stack with some math that looks at the relationship between two or three different empties, sure, you can do that too. Click that “add input variable” button and you’ll get a new variable you can use in your math.

1 Like

Thank you. Yep I found a way to add multiple object to driver. To be able to have 2 or 3 variables to get average.