Inverse kinematics with prismatic joint

Hi,

I’m trying to use armature wtih inverse kinematics and on of the conections/constraints is prismatic joint. I can make ik to stretch that one bone and it works, but I can’t limit it. I have tired to limit the next bone with “limit location” and “limit distance” but it dosen’t have any effect on the stretching bone. I set the stretching bones value “IK stretch” to 1. If I use “trac to” option, then the IK chain brakes.
Any idea how to limit the stretching or how to make prismatic joint, so that IK still works from the end to start?

Constraints aren’t going to work on IK chains-- it’s basically IK chain or constraints, not both. (A few minor exceptions.)

I would think that the main problem with a prismatic joint in an IK would be that it would lead to multiple IK solutions, which is pretty risky in terms of twitch.

That’s part of the problem with “I can’t limit the stretch”-- in what situations do you want it to stretch, and in what situations do you want it to not stretch? That part needs to be defined before a solution can be reached. The other part of that problem is simply not putting the IK target anywhere you don’t want it to reach. You can do that with constraints on the IK target, but that’s not even necessary usually-- not putting things in the wrong places is a part of the animator’s job, not the rigger’s.

A picture of the exact structure you’re trying to rig (probably, just your mesh object) would help anybody to figuring out a solution. It will suggest angle and extension limits.

I was thinking to try blender IK solver for my robot controller ( to get right rotations and positions to get certain point), but maybe I have to use some other tool.
Thats good to know that IK and constraints are different thing. Thanks.

@compinq Hey, as bandages said more info and context would be very helpful. Ik is the solution but with out the correct set-up you are stuck, so if you can post more info I can help. Are you trying to replicate a real robot arm or is this like some kind of character, the whole stretching thing is whats throwing me off, as mechanicals don’t stretch at least not until the point of failure. Post back if you can, thanx

Well yes, the robot arms can’t “stretch”, but I tried to mimic a prismatic joint ( slider or telescope arms have these) with that.

Hey, thanks for your reply, I have reproduced your armature set-up based on your screen shot, so you want ‘beam end’ to ‘slide’ back to ‘beam start’ ? If this is the case, then extrude a new bone from ‘beam’, parent it to ‘rotate’ bone, use this new bone (IK_Trgt) as your IK target - put the IK constraint on ‘beam’ bone with Chain Length of 1, parent ‘beam start’ and ‘beam end’ to ‘beam’ bone NOT inherit scale, that should get you what is required. If I mis understood then post back and I will provide a different solution. Thanx
EDIT; rotate 2 bone must also be set to NOT inherit scale

@compinq I see the obvious flaw in my solution now :upside_down_face:
To fix, building on what I stated above, I see no reason to have the ‘rotate’ bone separate from the ‘beam’ bone - so merge those 2 bones to have 1 beam bone parented to ‘start’ bone. Relocate the ‘beam start’ bone to the head of ‘beam’ bone, recheck bone roll on all bones (I would set them to Global Z+) but thats up to you as long as its consistent. To deal with what will be a IK dependency loop - extrude a new bone (Base lets call it) from ‘start’ bones head (X+) and parent the ‘start’ and ‘IK_Trgt’ bones to the new ‘Base’ bone. To get the ‘start’ bone to ‘track’ the ‘IK_Trgt’ bone add a “Track to” constraint to ‘start’ - targeting ‘IK_Trgt’. If there is a reason to have a part/object parented to ‘beam’ bone, just duplicate it and parent it to ‘beam’ NOT to inherit scale. This should be what you need now, Thanx