How to Animate an Object Based on the Proximity of Another in 3ds Max

Published on January 06, 2026 | Translated from Spanish
Reactive animation in 3ds Max with script controllers

How to Animate an Object Based on the Proximity of Another in 3ds Max

Creating a reactive animation in 3ds Max, where the scale of object A depends on the proximity of another object B, is simpler than it seems. You don't need to be an animation wizard, just a bit of logic and some built-in tools. And no, you don't need a magic spell! 🎩✨

How to Do It Step by Step

First, you need to measure the distance between the two objects. For this, you can use a Script Float type controller on the scale of object A. Inside the script, you calculate the distance between the positions of A and B. Based on that distance, you can make the scale vary between defined limits.

A simple example of code in the Script Controller would be something like this:

dist = distance $objectA.position $objectB.position
minDist = 0
maxDist = 100
scaleMin = 0.1
scaleMax = 1.0

-- Clamp the distance so it doesn't exceed the limits
distClamped = (dist < minDist) ? minDist : (dist > maxDist) ? maxDist : dist

-- Map the distance to inverse scale: closer, bigger
scaleValue = scaleMax - ((distClamped - minDist) / (maxDist - minDist))  (scaleMax - scaleMin)
return scaleValue

Then, you apply this controller to the scale of A on all three axes so the scaling is uniform.

Using Wire Parameters

If you prefer not to use scripting, you can use the Wire Parameters system to connect the distance (calculated with a Point Helper type helper and a Dummy) to the scale and apply a remapping curve in the Curve Editor.

Using Reaction Manager

Another option is to use the Reaction Manager to create relationships between parameters of different objects visually. This allows you to define how one object reacts to changes in another without needing to write code.

With a bit of scripting in the scale controller or using the wire and reaction systems that 3ds Max includes, you can easily animate an object changing size depending on its proximity to another. And remember, math is your best ally! 🧮

Creativity and experimentation are key in animation. Don't be afraid to try new techniques and tools!