I am trying to create a model of my sons toy train and am using a mixture of parented and copy location and rotation constraints to get the wheels and connecting rods to animate correctly.

My differs from a normal piston style train as the body of the train moves with the motion. Here is a gif of what I have so far:

Train in motion

The trouble I am having is when I try to reposition the whole train whether it be by moving it in the world or by rotating it.

The following image shows what happens after moving my Train parent in the Y-Axis. Body Separation As you can see, the body has become separated from the cab.

I have spent hours trying to solve this issue with no luck. I have tried adding a limit location constraint as proposed in this question but couldn't get this to work either. Any help with this would be greatly appreciated.

  • $\begingroup$ Hi @Edgel3D, thank you for this, from the video this looks exactly what I was after! I have opened the blend file to take a quick look but cannot seem to see anything on the ATT plane, judging from the texture panel it looks like a text file should be included but I am guessing it has not been embedded. I will hopefully get some time tonight to pick through the blend to see how it all works nevertheless. $\endgroup$
    – EdSalter
    Jan 25, 2018 at 16:34
  • $\begingroup$ To recover the text file - Get into the textures properties, open the "Image" tab and click on the tiny folder icon that's grey'd out. (lower one) Select the second option. Exit from Blender and don't save. This will keep the text file and create a folder from the current one called "Textures". A copy of the file will be in there. (Nice model by BTW) $\endgroup$
    – Edgel3D
    Jan 26, 2018 at 1:26
  • $\begingroup$ PS to the above - Have corrected a misleading instruction in the text file. A revised Blend file has replaced the old one and also a copy of the text file is at the above link. You may need a short video to demonstrate an easy way to synch up the two parts if you have problems. $\endgroup$
    – Edgel3D
    Jan 26, 2018 at 11:12
  • $\begingroup$ @Edgel3D, thanks again for your help with this. I have managed to find some time to follow your instructions and have ended up with the following: youtu.be/1L2Cat8aKxY I used the loop count setting in the NLA editor which I think is what you refer to as the loop back feature? I need to find some time to add in the smooth start up and slow down at the end and some more interesting camera work but your method has certainly helped me get the desired effect. Lining up the two circles on each keyframe was genius. $\endgroup$
    – EdSalter
    Feb 5, 2018 at 7:54
  • $\begingroup$ EdSalter , great! Glad I could help! Thanks for the note - I tried the loopback feature but in version 2.77a I either have loopback or I don't. I wasn't able to switch over to a slow down sequence and had to revert to the original idea. I'll place the whole caboodle up as an answer so you can tick it off. (Curious since switching to Chrome browser cannot place the @ sign in your ID - the editor takes it then it disappears) $\endgroup$
    – Edgel3D
    Feb 5, 2018 at 11:26

1 Answer 1


enter image description here

Instead of the crank's motion driving the body back and forth, I elected to keyframe the body's animation and synch that up with the crank's motion...

Here's how...

Position the crank with one of it's ends hinged at the rear wheel's crank-pin. Set it's Point of Origin at the pin's center.

Use the "Track to" constraint to always look at the front wheel nut.

Rotate the rear wheels 360 degrees over the desired frame range for speed of rotation.

Make sure the two keyframes are set to "Linear" interpolation. (select keyframes in Dope sheet and press T)

Step the timeline cursor to the 2nd last frame and insert another rotation keyframe.

Delete the last rotation keyframe. This is to avoid a one-frame pause when at the next frame, we loop back to the first rotation frame again.

Play the animation and check that both keyframes are indeed linear. If unsure, check the graph editor. There should be a straight line (no curvature) in the transformation.

Set the view into Ortho Mode and from the side view and at frame 1, position the crank (in the Y axis only) over the front wheel nut as desired.

Add an object or mesh circle and center it at the front wheel nut's center. Make it a child of the crank.

Duplicate the marker and move it out in the X axis slightly, parent that to the Wheel nut.

These are going to be reference markers with which to keep the front wheel in the same relative horizontal position with respect to the crank. (i.e. keep both markers aligned in the Z axis by moving the body (boiler) in the Y axis only)

Step to frame 2, Drag the body (boiler) in the Y axis so both markers are aligned in the Z axis again.

Repeat this over the full number of frames you've got so far. (29 frames?)

Save the project under a different filename. (One_Rev.Blend?) This will be a return reference point which you can always come back to.

In the Dope Sheet, duplicate all keyframes for the rear wheel's rotation and Body's animation and slide them to the right, one frame on from the final keyframe.

Check that out, make sure there's no jitter between each revolution.

Repeat the copy procedure, doubling the animation frames each time until you have sufficient.

Check it, make sure the crank isn't slopping around the front wheel nut. LCD screens may make it appear to be doing this but if you switch off the nut's visibility you will see that it's not.

If a slow down is required at the end, the Body's keyframes will need to be realigned for those slow-down frames.

The model is now ready to follow a path or be moved about manually or keyframed.

Save the project. This can be used for other projects that wish to use the loco.


Repeat Loop-backs for the extended animation would be a desirable alternative to the duplication process but in Vers 2.77a it appears you either have "cyclic" for a dopesheet strip, or you don't. There's no Bezier + Linear + Bezier again to start off slowly or slowdown at the end that I can see.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .