4
$\begingroup$

I am trying to rig a truck with a trailer so it can be animated along a path/curve. Having the trailer follow is not a problem, but in order to look realistic it shouldn't follow the exact path of the truck it is attached to, but a shorter one.

There is surprisingly little documentation about this on the web, for Blender or any software.

I have seen that this dynamic is sometimes built into ordinary car rigs, where the front axle of the car is animated and the rear is dragged behind it in a realistic manner, but no tutorial I have found has a setup like that explained.

$\endgroup$
  • $\begingroup$ How about put the trailer's origin right in the middle of the wheel base on the ground, and let it track to the position where it hooks onto the back of the truck. Have no idea how to work the reverse. $\endgroup$ – TeaCrab Jun 26 '17 at 14:46
5
$\begingroup$

I actually managed to make it work using Bones and kinematics. Basically I used the description from: How to IK rig legs

.. to create an inverse kinematic constrain. But additionally I added a copy-constrain from the "target_bone" to the foot and then it worked. (target copies from foot)

I cascaded it 3 times to get an articulated trailer: enter image description here

Edit: Here is the dependencies I have for one instance:

From How to IK rig legs :

  • 'foot' is child of 'shin'
  • 'shin' has IK constrain from 'control'
  • 'foot' copies rotation from 'control'

At this point you should be able to move the foot and the shin changes accordingly

My Addition:

  • 'control' copies location from 'foot'

Note: that these constrains must be bone constrains (i.e. in pose mode) not object constrains.

$\endgroup$
  • $\begingroup$ I am trying to follow your instructions but cant make it work. First of all, there should be only one joint in my case. Secondly, I don't really get what the purpose of the target bone is. In the interest of simplicity, wouldn't 2 bones in total be enough; truck-bone gets its rot/loc from an empty following a path, and trailer-bone simply drags behind? $\endgroup$ – ducks Jun 26 '17 at 7:56
  • $\begingroup$ I don't get the control bone purpose 100% either. See my edit for an overview of dependencies. You always need one bone more to define the end-point of the previous bone. Thats why I have an additional bone which I called 'dummy' $\endgroup$ – DrJamgo Jun 26 '17 at 11:08
3
$\begingroup$

I would attempt this method (I do believe that this totally doable in Blender - could be wrong though - I want to get you thinking with this limited example though, because it may spark some ideas for you):

  1. Your rotational pivot center will be at the center of the axle being dragged, and your point of tongue will apply this radial & linear directional force. Meaning in short that you will rotate on your axle center until you find equilibrium with the direction you are pulling.

  2. If the distance you are pulling exceeds that of the triangle formed between the tongue and the two wheels of an axle, then you will drag the trailer for a bit (until the trailer rotation catches up). For the correct answer you may want to check the Math & Physics stackexchange sites.

Here's a quick example of something close to what I was thinking, this was done using constraints, and it is not updating the pivot point, so it looks kind of funny when you get away from it.

I do believe that the solution to this is using drivers, but I'm not totally sure, without spending the time to play with them.

When I get a moment, I will try to update this answer, as I am hopeful.

Constraint Example:

enter image description here

$\endgroup$
  • 1
    $\begingroup$ From some of my own experience with this problem, it's very difficult with just constraints/expressions/keys, since the trailer only follows due to ground friction. (if you hold a toy truck in the air and turn the trailer, it will not naturally straighten out) $\endgroup$ – JtheNinja Jun 22 '17 at 3:59

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.