# Limit a bone's local movement with a bone?

I’ve got an ‘IK’ ON/OFF switch and a separate ‘Stretch’ switch, using bones to drive IPOs on ‘Loc X’ – how do I set them up so that the ‘Stretch’ switch can only be moved if the ‘IK’ switch is ON (and so when ‘IK’ is turned to OFF, ‘Stretch’ is forced to ‘OFF’ as well)?

Somehow I get the feeling this is an easy one, but I’ve been thinking about it for a few minutes and can’t figure it out…

Well, first you should add some limit location constraints to delimit the area of movements of the switches. Then, you could perfectly set a limit distance constraint to the stretching switch. That way, you can prevent that switch from moving away from the IK switch. Therefore, if the ON position is when the switches are moved to the right, if the IK switch is at the left of the panel, the stretching switch won´t be able to move to the right. But, when the IK switch moves to the right, the stretching switch will be able to move also.

Your idea is good jpbouza, but what if you want the IK on but the stretch off? If the stretch is constrained to the IK you will be unable to do so.

I would recommend constraining the location (and rotation if the switch travels with the rig) of the stretch switch to a dummy bone. Then drive the location constraint with the IK switch… so when the IK is on, the constraint is off, but when the IK is off, the constraint is on (locking the stretch switch at 0).

I’ve attached an example to show you, because I don’t actually consider this to be easy :rolleyes:

Try moving the red control bone way off to the side, then play with the switches. The stretch applied only to the forearm is not very useful of course, I just made it simple and quick for demo purposes.

### Attachments

switchingSwitches.blend (161 KB)

‘Limit Dist’ is one of the things that went through my mind too, but having IK ON and Stretch OFF was the last problem I couldn’t solve.

Using ‘Copy Loc’ on a dummy bone seems to work just like I need (I thought the stretch switch wouldn’t register it’s own local movement)! Thanks guys!