[Closed] controlling max/min distance from parent
I’m trying to figure out how to limit the distance an object can be from a parent object. Both objects are used as animation controllers in a character rig. I’d like to limit the distance an animator can move something like an IK handle (or it’s parent control) from another object being used for control further up the chain.
for example, the IK through the upper and lower arm, ending in the wrist–2 bone chain. I dont want the animator to be able to move the IK at the wrist past the length of the arm from the shoulder, or move the wrist through the shoulder.
I’m thinking I should use an expression controller, but aren’t these only evaluated on a frame by frame basis?
You could use the mouseMove event handler to test the node’s current position from the parent, perhaps. I think that is called whenever it is required, not just on a per-frame basis.
hmm. looks like maybe a combo of a callback registered as a redrawViewsCallback registering a function testing against a on MouseMove event. but the mouseMove could happen with any flavor of manipulation.
any way to test if the user/animator has the move tool active, as opposed to the rotate or scale tools?