# Move two objects together on two different spline

**URL:** <https://forums.synfig.org/t/move-two-objects-together-on-two-different-spline/13158>\
**Category:** Animation related help\
**Created:** [April 14, 2022, 1:46pm UTC](https://forums.synfig.org/t/move-two-objects-together-on-two-different-spline/13158 "2022-04-14T13:46:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Teo76](https://forums.synfig.org/letter_avatar_proxy/v4/letter/t/ecae2f/32.png) [@Teo76](https://forums.synfig.org/u/Teo76)\
**Post date:** [April 14, 2022, 1:46pm UTC](https://forums.synfig.org/t/move-two-objects-together-on-two-different-spline/13158/1 "2022-04-14T13:46:03Z")

</div>

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?  
Thanks

---

<div class="post-metadata">

**Author:** ![rodolforg](https://forums.synfig.org/letter_avatar_proxy/v4/letter/r/c68b51/32.png) [@rodolforg](https://forums.synfig.org/u/rodolforg)\
**Post date:** [April 15, 2022, 10:59pm UTC](https://forums.synfig.org/t/move-two-objects-together-on-two-different-spline/13158/2 "2022-04-15T22:59:28Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![woody](https://forums.synfig.org/letter_avatar_proxy/v4/letter/w/ac91a4/32.png) [@woody](https://forums.synfig.org/u/woody)\
**Post date:** [April 16, 2022, 4:21am UTC](https://forums.synfig.org/t/move-two-objects-together-on-two-different-spline/13158/3 "2022-04-16T04:21:41Z")

</div>

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](https://forums.synfig.org/uploads/short-url/i8exFBvwmBLzlxW2rK5PbFrflvF.sifz) (4.1 KB)
