# Rigging a 2-d joint chain with flippable joints

#1

[quote]
View in #rigging on Slack
@tessamonash: @tessamonash has joined the channel
Hey all! My name is Tess and I’m a technical animator working on a 2.5D platformer called the Artful Escape. I have a feature I want to implement in the rig of our main character but I’m not really sure how to achieve it! Any ideas would be very much appreciated I’m working in Windows and Maya.
Ok so the rig is made up of flat meshes staggered in Z space (as you can see in the diagram below). It’s essentially a 2D rig, made to be viewed from only one angle. Thus one of my main rigging constraints is that I don’t want to flip PVs as this flips the artwork and deforms some of the meshes in a gross way. However, I want to be able to achieve a pose like pose A - where the right knee looks to be bent inwards.
Currently I have a snappable knee set up, driven by distance nodes, that allows me to manually position the knee with a locator…buuut this doesn’t work if I want to move the locator behind the leg as the bones are still constrained by the IK handle.
Any ideas on how I can create a ‘breakable’ IK knee without any PV flipping? Is this even possible?

@covinator: Instead of solving this with a rig, i’d probably solve this with a post process that matches your z-locked planes to your bone positions in a specific projection
then the flipping/rotating stuff isn’t really a problem anymore

@brian_venisky: OHAI @tessamonash

@chrislesage: Another way could be to have 2 chains per leg. One pointing forward, and one pointing backwards, like a diamond. And then blend a 3-point linear curve or ribbon IK that blends between the two chains. That curve or ribbon drives the skin joints.

(Doesn’t have to be a curve. But that could be nice and easy to visualize and debug without getting into math and nodes and avoiding IK popping.)
Blended halfway would be a straight line.

@mikemalinowski: @mikemalinowski uploaded a file: dynamic_orient.gif and commented: @tessamonash In Maya it is the Joint Orient attribute which defines which way the IK Handle solves - so to get a rig which allows you to solve in either direction without flipping you can invert the joint orient value.

In the video here I have a two bone chain (coloured red and green to show it does not flip), i then create a locator to use as a pole vector. If the locators translate x value goes above zero i invert the joint orient value. In this way the pole vector works as intended but when it goes past zero it inverts the joint orient ensuring maya solves the IK without flipping the joints.

That all makes it sound more complicated than it is… in reality its just a single condition node between the polevector control and the joint orient

@: @tessamonash commented on @mikemalinowski’s file dynamic_orient.gif: Ahhh, thank you so much for the gif and explanation! I think this is the simple solution I was looking for