# Novel Use of Drivers [duplicate]

I am having no luck with the following: I would like to set up a driver that looks at the Z position of an object falling per RB physics (not BGE) and controls some constraint settings based on Z position. To be more specific, I am trying to use a driver to break a constraint or reduce its breakable threshold as the object (constrained with other falling objects) nears the passive ground plane. Any thoughts would be appreciated.

## marked as duplicate by stacker, Ray Mairlot, gandalf3♦, user2859, PolossonSep 23 '14 at 20:26

• I think it's not ok to post dupes and don't comment on the original answers why they don't work for you. – stacker Sep 23 '14 at 18:51

i posted exactly how to do this in your other post almost a month ago.

Can I use Weight Paint to Control Animation Properties?

The following code will work on an object i fractured using Cell fracture, the object named "Cube". then i used the Bullet Constraint tools 'Single constraint' to make the constraints. this code wont work if you have used Empties to constrain the objects together.

and a blend file.

press alt A, you will see the box stays together. run the script (alt P in textblock) and then animate again. you will see the box stays together, until the plane moves above each object.

object_name = "Cube"

import bpy

for obj in bpy.data.objects:
if  object_name+"_cell" in obj.name: