a latch - Problems with constraints

Reference the attached .blend file.

What I want:

  • When I rotate the latch’s lever, the bar should move up or down.
  • When I move or rotate the cube the latch is attached to, the latch’s pieces should stay still relative to each other.

What happens:

  • When I rotate the cube, the latch bar does not rotate even though the rest of the latch does.

What do I need to do to get what I want?

Attachments

temp.blend (238 KB)

First off, the cube has a rotation of 90,0,90
This type of thing is generally easier when all rotations are cleared out when an assembly is in its default pose.

That said, as long as the cube only needs to rotate in one axis (like a door opening) you can just include “Rot Z” in the ChildOf constraint of the latch bar object. (when you first make that change, the latch bar will rotate and you’ll have to counter rotate it, but then it should behave properly)

If the cube need to rotate in multiple directions, I would suggest using actual child-parent relationships rather than constraints. Then you’ll have to manually rotate the latch bar, or set up ipo drivers:
http://tinyurl.com/mjkmfr

BTW, I don’t think the latch manipulation object is necessary for what you’re trying to do. If it’s just visual, you can join it with the latch lever.

I’ll probably just parent the bar to the lever. I would have liked to have the latch act like it does in real life, but it’s only a still scene anyhow.

LOL! This is for a still scene? … That’s cool. Even though it wasn’t necessary for this shot, you probably learned something about constraints and parenting.