About the Transform Constraint : explanation of the behavior?

Hello, I let you a simple .blend file.

There are 2 objects and an armature. The wheel uses a Transform Constraint so when I move the “Cube”, the wheel rotate but once I make a 180° turn with the cube, the rotation goes backward. I don’t understand why.

test_transform.blend (915.1 KB)

Have you switched on the Extrapolate option?
That will continue the effect once things have moved beyond the bounds in the min/max values.

Yes, you can check with the .blend.

I just looked at your file now. It’s behaving in the way that I’d expect it to. It doesn’t look like it changes direction.

Did you play the animation ? As I wrote, it’s once the cube makes a U-turn that it behaves weirdly.

When you rotate the top bone, it starts moving back towards it’s original position. So the offset in local space is getting smaller.

The lower bone is changing it’s rotation direction. But because it’s a child of the main bone, the whole setup has turned around. That makes it look like it’s rotating the same way that it was in the initial direction.

What I don’t understand is in Local Space, the Top bone keeps moving towards its -Z axis and the rotation information of the lower bone comes from this. So there’s no reason to go backward.

I tried without an armature and it’s another behavior : the rotation goes backward only during the turn then it goes forward again (see .blend).

test_transform_no_armature.blend (910.8 KB)

No, i suggested to uncheck “inherit rotation” but this just excludes the wheel from the turn, ignore it.

test_transform_rotation_driver.blend (907.1 KB)
Now i added a small expression(driver) for rotation based on whether Y rotation of Bone is zero. But i always find it confusing to transfer the data i see in view item inside the driver.

Yes, thanks. It stops rotation during the turn :wink: .

It’s like Blender makes a confusion between World and Local Space (or maybe it’s me :upside_down_face:).

Well, the more I think about it, the more I think it’s not the good way to achieve what I want.

It could make more sense in the graph editor to understand why it doesn’t work : when the top bone rotate by 180°, the Z value doesn’t continue to increase but why it behaves another way when no armature involved ?!

Have a look at the Follow Path constraint. There are vids on YouTube where people have a wheel rotate as it travels along a path.

Yes thanks, that’s an good alternative :).

If someone has an explanation for the different behaviors between with and without armature, I take it :slight_smile:.

In fact, the follow path doesn’t solve the problem. Here is a solution but it’s not simple : Car follow path and wheel rotation

And a simpler one : https://www.youtube.com/watch?v=AqkwUSU1CiU

The thing that is not clear to me is by what value to divide the offset in the Expression of the driver. It’s not the perimeter of the wheel.

1 Like