Move two objects together on two different spline

HI all, I just started to use Synfig and I would like to move two object together.

Let’ do an example: think of moving a locomotive and a wagon, they are on the same track, until the wagon detach from the locomotive and follow a different track. So two object that are linked together that at certain time they follow different path.

I tried to do two path that follow the same initial trajectory and the two blocks each on one path. The problem is that if the path have different lengths the velocities are different.

I hope it is enough clear.
How to deal with it?

  1. Do not link both blocks (locomotive and wagon) to each other;
  2. Create the two paths (the main one and the secondary one);
  3. Export the vertex list of each path (I’ll name them here as Path1 and Path2);
  4. Link the locomotive to Path1 as you usually do;
  5. Convert the Origin parameter of the wagon to a Switch value node;
  6. Expand the origin switch valuenode and convert both the Link On and Link Off to Spline Vertex value nodes;
  7. Link the parameter Spline of each spline vertex value node to the exported paths (Path1 and Path2)
  8. Toggle the Switch when you want to switch the path the wagon follows :slight_smile:

Depending how you set this up, presumably you have a linear conversion feeding the “amount” field of a couple of different spline-vertex conversions. Disconnect one of those and place a scale node in between, then you can just fiddle with how much scale you need to apply to one of them to make the race a tie. Or better, use two linear conversions instead of one and tweak the “rate” fields. Or, quite possibly, I answered the wrong question, as I often do.
traintracks.sifz (4.1 KB)