Here is the object I want to animate.


It's pretty much about piston moving in the syringe. But how do I make it move along the syringe's axis, "lock" it in the axis so I don't have to position it myself every frame? What constraint should I use? I noticed the "Follow Path" and "Clamp To" constraints but I am not really sure how do I use them.


You could do it this way (here, syringe and piston are two separate meshes in one unique object):

  • Create an armature with two bones, the top is child (Keep Offset mode).
  • Parent the syringe to the armature With Empty Groups.
  • In the Properties panel > Data > Vertex Groups, assign the piston vertices to the vertices group that has the name of the top bone and the syringe vertices to the vertices group that has the name of the bottom bone.
  • Select the armature and switch to Pose mode.
  • Select the piston bone and give it a Limit Location constraint.
  • Activate all axis to limit the piston in all axis possible.
  • Keep all values to 0, just change the Y maximum value (here: 2), Y being the vertical axis of the bones.
  • Choose Local Space instead of World Space, so that it takes only the local space of the object into account.
  • Now when you move the piston bone it will only go up and down and will be blocked at its maximum Y value.

If you piston and syringe are 2 separate objects, keep the same bone settings, switch the armature to Pose mode, select the piston object, select the piston bone, and ctrlP > Bone. Same thing for the syringe.

enter image description here

  • $\begingroup$ I have a bit of a problem since I am not familiar with rigging at all. I should parent both piston and syringe to the armature object, right? Both in syringe's and piston's Data there are two vertex groups named just as the bones are, if I do it. How do I exactly assign them? $\endgroup$
    – danshat
    Jan 2 '19 at 11:54
  • $\begingroup$ Nevermind, figured it out. $\endgroup$
    – danshat
    Jan 2 '19 at 12:08
  • $\begingroup$ when you parent With Empty Groups, it gives your mesh as many groups as you have bones, with the same bone names, but it doesn't assign these groups to any vertices, you have to do it manually: select the vertices you want to assign to a group and press the Assign button. Then the bone will control the vertices group that has the same name. $\endgroup$
    – moonboots
    Jan 2 '19 at 12:40
  • $\begingroup$ Often for mechanical rigging (no deform) it is simplest to parent objects directly to assoc. pose bone. No modifier or vertex groups required. $\endgroup$
    – batFINGER
    Jan 2 '19 at 12:52
  • $\begingroup$ "to pose bone"? what do you mean? $\endgroup$
    – moonboots
    Jan 2 '19 at 12:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.