During some tests in blender without having a certain goal in mind I wanted to be able to map the distance between two objects to the scale value as constraint.
(In some combat helicopter movies you sometimes see the environment through the high-tech helmet optics of the pilot. There the HUD display generates a rectangle around a moving target with a small also rectangular indicator for the distance.)<- That’s where the idea came from.
So I came up with this little simple pyConstraint script where you can configure which axis to scale, a distance range defined with min and max value, a scale range with min and max values and you can invert the scaling direction in respect to the distance change.
The two targets which will affect the scale of the constraints “owner” have to be defined in the GUI. If the first target is the same object as the one the constraint is assigned to, its distance to the second target will determine the scale value. You can of course define two other independent objects as well.
Dunno if it’s useful for someone, anyway just wanted to share it here.
P.S.: I’m using the 2.48 test build (247.9)