Driver Question?

Is it possible to use drivers to have an empty trigger an animation in another object based on the empty’s location? I haven’t played with drivers much and I’ve seen a couple of tutorials but I’m still confused on a lot of things.

The usual usage for a driver is to use the spacial data of an object to control a number on another object. The typical usage is to add a bone that acts like a switch so you can turn an armature from being FK to IK. In this case you use the driver to convert the switch’s position to a value to updates the “influence” field of whatever constraint you are using to control the IK behavior.

In general, drivers solve the problem of having to dig though a property panel to change a setting or being able to change multiple settings with a single switch or knob. The driver lets you put a bone on the screen that you can change instead of having to page though property drop downs to find the one you want.

What kind of animation are you trying to trigger? It would be fairly straight forward to use a driver to update a shape key on another object, but actually triggering a new animation would be difficult. Is this for a game?

The usual approaches to animation are

  1. scripted animation where you lay out all your objects and set key frames. In this case you just start your animation at the right time.
  2. In a game or simulation you might want to start an animation when certain events happen. I think in the BGE you usually define Sensor actions that can start animations when objects get close to eachother.

The animation I want to trigger is basically a plane that scales up then rotates( no bones ). not for a game.
Im going to have a lot of those objects and I would like them to play the animation when the empty is near.
Can this only be done with python or can it be done with drivers because I don’t know much python

Something like that can probably be done with drivers. I’ve only watched 1 tutorial on CG Cookie and even the guy doing the tutorial didn’t know what he was doing. I keep meaning to try to find a better tutorial or write my own because they are a somewhat confusing feature with a really confusing UI on top of them.

Here is a sample .blend done in v2.62 with a Cube and an Empty. As you move the Empty closer toward the center of the cube the cube adjusts its scale and rotates around the World Y-axis. There are some scale constraints on the Cube to keep it from getting too big or being smashed into a point.

Attachments

driver.blend (370 KB)

thank you, the blend file helped :slight_smile:
but still doesn’t solve the problem
I’ll keep playing with drivers a little more

Yeah, drivers need some explination and even posting an example is not super helpful. It sounds like drivers can achieve the effect you want but without the exact effect then it is hard to offer specific advice.

Thanks for the BLEND file. It is a nice example. It took me a while to realize I have to move the empty towards the origin to see the entire effect.

That’s the other problem I have with posting technical .blend files; It is not obvious what effect or feature they are trying to show off. :frowning:

For the record, the driver effect is controlled by how close the Empty is to the center of the Cube. If you move the Cube off the World origin then the effect would change as well.

I’m thinking the action constraint would be useful here…

Randy

thanks so much :slight_smile: way easier that using drivers
Not sure if it will solve the problem by itself I need to play with it a little more
very cool