Rotation constraint problem

Hi,

I have a problem with something I thought would be very simple to do.

I have an armature for which I want to constraint rotation on X in a range from 85° to 224°, so I apply a rotation constraint to it with min 85° and max 224° on X.

Problem is when I try rotate the armature from 85 to 224°, it doesn’t want to pass 180°. As soon at it reaches 180°, it jumps back to the 85° position…

Here a small gif :
Sans titre2

I must be missing something, any help appreciated.

There is no such thing as 224 degrees rotation. After conversion to a a matrix then back into Eulers, rotation exists only in -180,180 range. If you want to limit to 85, 224 you need to adjust the bone so it points in a different direction, or create a child pointing in a different direction, such that 85, 224 lies within that -180, 180 range. I’d demo something, but it’s a little difficult to imagine what real-world situation you have in mind…

(Keep in mind too that world space euler angles are not always what you expect them to be. Euler angles are a weird abstraction; real-world orientations are not 3 independent variables. In the case of the world X axis, like you have here, it’s probably not an issue, but I believe that you’re cruising for a bruising…)

Thanks for your help. Sorry, the non-existence of 224 ° rotation saddens me a lot and i don’t even know what a Euler is … :smiley: so have difficulty understanding, specially the last part of your post. I just want to limit the rotation of that armature within the 85° - 224° range (that armature will be parent of an airplane landing gear leg, the landing gear would be extended at 224° , and retracted at 85°, anyway that is the 3d , non real-word project…).
I suppose this is possible.
Do you mean applying a bone rotation constraint instead of a constraint to the armature ?

1 Like

Edit sorry my answer was for galgot I replied to you by mistake!

The non existence of 224 rotation is due to the way the constraint works.
Think of it like this, if you are looking in one direction you can turn 180º (+180) to the right or 180º to the left (-180). If you turn 270º to the right you would end up 90º to the left!

The best thing to do would be to rotate the bone in edit mode on the x axis so that it is inside the range of the rotation you want. That way your bone is at 0 rotation inside the range you want.

Then go to pose mode and use a bone constraint in local coordinates. You could do it in object mode with an object constraint but with bones it is better to use pose mode as you can the set poses for your bone.

For bone constraints you should use local coordinates, if you use world coordinates and then rotate the whole aircraft model in world space it would mess up your constraint.

Here is an example of what it should look like in pose mode.

For this example I rotated the bone in edit mode 154.5º (x axis) which is the midpoint of your desired rotation
224-85=139, (total local rotation permitted)
39/2=69.5, (local midpoint)
85+69.5=154.5 (world midpoint)

The bone in the image has a local bone rotation of 0º (because I rotated it in edit mode)
I set the min and max to -69.5 and +69.5 (half of 139)

The bone will now rotate as you expected.

You could also do this by rotating the bone in edit mode 85º, then in pose mode set the bone constraint to min -139 and max 0 local coordinates.

Yes, blender can get confusing and I hate math!
Edit I have corrected the local rotation + and - signs in the diagram

2 Likes

Managed to make it work as I wanted following your explanation. Indeed it’s much clearer for me now.
Thank you very much for taking the time to explain me that throughoutly in that practical way.

You are welcome these answers help me to clarify how things work as-well.
In a practical sense you do not need to do all the math (unless you want absolute precision). The important thing to bare in mind is to position your bones in edit mode to the correct location and rotation in your scene before animating them. After that you are able to animate them in local coordinates in a logical way in pose mode.

Another confusing thing is the bones axis, when you create a bone they have the y axis up and the z axis forward, which is the reason that the rotation in local x axis is flipped. That is why if you rotate the bone in edit mode 85º, the constraint in pose mode is set to min -139 and max 0.

In my diagram the + and – signs on the 69.5º local angles were wrong, I have now corrected them.
Phew! It took me a while to work that one out logically!

1 Like

I’ve bookmarked this thread :slight_smile: Was indeed more complicated than I thought would be.

But here is what I’ve managed to do with your help :
MLG
The landing leg has now a limit rotation constraint working, even though I’ve now added a control object to which I’ve assigned a limit rotation constraint . But anyway, I’ll keep that constraint on the leg, so if I need to rotate just the leg itself I’ll not mess the whole thing.

Thanks again.

1 Like