# What to replace with timeline component to get the character going both ways in a spline, and distance and speed based instead time?

**URL:** <https://forums.unrealengine.com/t/what-to-replace-with-timeline-component-to-get-the-character-going-both-ways-in-a-spline-and-distance-and-speed-based-instead-time/2673447>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, please-help-me, Spline\
**Created:** [November 10, 2025, 12:10pm UTC](https://forums.unrealengine.com/t/what-to-replace-with-timeline-component-to-get-the-character-going-both-ways-in-a-spline-and-distance-and-speed-based-instead-time/2673447 "2025-11-10T12:10:37Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![NEYSE\_O001](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/neyse_o001/32/1139179_2.png) [@NEYSE\_O001](https://forums.unrealengine.com/u/NEYSE_O001)\
**Post date:** [November 10, 2025, 12:10pm UTC](https://forums.unrealengine.com/t/what-to-replace-with-timeline-component-to-get-the-character-going-both-ways-in-a-spline-and-distance-and-speed-based-instead-time/2673447/1 "2025-11-10T12:10:37Z")

</div>

![resim](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/3/7/737d8c038b5d42d90794d9343fcb3619424a04bb.jpeg)

I am quite a rookie, just downloaded an example project from this platform to understand ssplines better. In this one its time based, even for me it’s pretty simple but unusable for me because I need the system to be simply distance based not time. The character will move along the spline towards or backwards depending on if the player is pressing on A or D key. How can I modify this simple BP to serve this objective, and primarily what should I replace the Timeline component with?

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [November 10, 2025, 1:08pm UTC](https://forums.unrealengine.com/t/what-to-replace-with-timeline-component-to-get-the-character-going-both-ways-in-a-spline-and-distance-and-speed-based-instead-time/2673447/2 "2025-11-10T13:08:30Z")

</div>

This is not time based, its based on the length of the spline, because I think that timeline values goes from 0-1?

Plug your A trigger into Play, and the B into Reverse 🙂

---

<div class="post-metadata">

**Author:** ![NEYSE\_O001](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/neyse_o001/32/1139179_2.png) [@NEYSE\_O001](https://forums.unrealengine.com/u/NEYSE_O001)\
**Post date:** [November 10, 2025, 1:30pm UTC](https://forums.unrealengine.com/t/what-to-replace-with-timeline-component-to-get-the-character-going-both-ways-in-a-spline-and-distance-and-speed-based-instead-time/2673447/3 "2025-11-10T13:30:29Z")

</div>

I see but the character must move with a certain speed, like lets say 200 units. And there will be a lot of different spline sets in the map, and in much variable lenghts. The character must maintain the same speed everywhere. How can I set a certain speed?

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [November 10, 2025, 1:37pm UTC](https://forums.unrealengine.com/t/what-to-replace-with-timeline-component-to-get-the-character-going-both-ways-in-a-spline-and-distance-and-speed-based-instead-time/2673447/4 "2025-11-10T13:37:04Z")

</div>

You need to set the timeline speed based on the length of the spline. The longer the spline, the slower it plays. So, some sort of division. If the spline is 2X as long, the TL should play at 1/2X speed.

If you drag the timeline reference from the components section ( bottom left ), you can drag from that and find ‘set playback speed’ ( or something like that ).

---

<div class="post-metadata">

**Author:** ![NEYSE\_O001](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/neyse_o001/32/1139179_2.png) [@NEYSE\_O001](https://forums.unrealengine.com/u/NEYSE_O001)\
**Post date:** [November 10, 2025, 1:48pm UTC](https://forums.unrealengine.com/t/what-to-replace-with-timeline-component-to-get-the-character-going-both-ways-in-a-spline-and-distance-and-speed-based-instead-time/2673447/5 "2025-11-10T13:48:50Z")

</div>

I understand the logic but I don’t know how to do that. Like let’s say it will take 1 seconds to go 1m along the spline, how exacly can I implement this in blueprint in a universal way so I can use it everywhere in the map?

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [November 10, 2025, 1:49pm UTC](https://forums.unrealengine.com/t/what-to-replace-with-timeline-component-to-get-the-character-going-both-ways-in-a-spline-and-distance-and-speed-based-instead-time/2673447/6 "2025-11-10T13:49:59Z")

</div>

Lets say you’re happy with the normal TL speed on a 1M spline.

Then, if the length is 2M, you will need to set the TL speed to 1/2 ( 1 over 2 ). If the length is 7M, the TL speed will be 1/7th…

---

<div class="post-metadata">

**Author:** ![NEYSE\_O001](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/neyse_o001/32/1139179_2.png) [@NEYSE\_O001](https://forums.unrealengine.com/u/NEYSE_O001)\
**Post date:** [November 10, 2025, 1:51pm UTC](https://forums.unrealengine.com/t/what-to-replace-with-timeline-component-to-get-the-character-going-both-ways-in-a-spline-and-distance-and-speed-based-instead-time/2673447/7 "2025-11-10T13:51:34Z")

</div>

Oh yes, and sorry for my rokieness but which actors and nodes I should use in this BP to achieve that?

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [November 10, 2025, 1:53pm UTC](https://forums.unrealengine.com/t/what-to-replace-with-timeline-component-to-get-the-character-going-both-ways-in-a-spline-and-distance-and-speed-based-instead-time/2673447/8 "2025-11-10T13:53:03Z")

</div>

Like I say, if you rummage around in the components section ( bottom left ) you can find a reference to the TL. Put that in the graph, drag off it, and find ‘set play rate’. You also have the GetSplineLength node.

---

<div class="post-metadata">

**Author:** ![NEYSE\_O001](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/neyse_o001/32/1139179_2.png) [@NEYSE\_O001](https://forums.unrealengine.com/u/NEYSE_O001)\
**Post date:** [November 10, 2025, 1:55pm UTC](https://forums.unrealengine.com/t/what-to-replace-with-timeline-component-to-get-the-character-going-both-ways-in-a-spline-and-distance-and-speed-based-instead-time/2673447/9 "2025-11-10T13:55:13Z")

</div>

So I should have to set it in every spline set manually? Is there way to figure it out matematicly in the bp? Like take the lenght, take the time for 1m, do the math and set the total time do travel along all the spline?

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [November 10, 2025, 1:55pm UTC](https://forums.unrealengine.com/t/what-to-replace-with-timeline-component-to-get-the-character-going-both-ways-in-a-spline-and-distance-and-speed-based-instead-time/2673447/10 "2025-11-10T13:55:59Z")

</div>

No, the speed is based on the length, you can calculate it in the BP

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/b/c/9bc22fcf7fc48088f58353f5c668a8bdb4d10710.png)

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [November 10, 2025, 1:59pm UTC](https://forums.unrealengine.com/t/what-to-replace-with-timeline-component-to-get-the-character-going-both-ways-in-a-spline-and-distance-and-speed-based-instead-time/2673447/11 "2025-11-10T13:59:17Z")

</div>

See this

> [@What math to calculate an even play rate for movement along a spline regardless of length?](https://forums.unrealengine.com/t/what-math-to-calculate-an-even-play-rate-for-movement-along-a-spline-regardless-of-length/630738):
>
> I’ve set up a simple actor BP with a spline and a skeletal mesh that moves along said spline. I’ve also set the play rate of my timeline (which is 1 second long) to be 1/DurationInSeconds meaning whatever number I type for DurationInSeconds is how long it will take to play the timeline. It’s all working perfectly. My question is; what would the math be to determine the duration to use regardless of the length of the spline so that the mesh looks like it’s always moving at a consi…

---

<div class="post-metadata">

**Author:** ![NEYSE\_O001](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/neyse_o001/32/1139179_2.png) [@NEYSE\_O001](https://forums.unrealengine.com/u/NEYSE_O001)\
**Post date:** [November 10, 2025, 3:59pm UTC](https://forums.unrealengine.com/t/what-to-replace-with-timeline-component-to-get-the-character-going-both-ways-in-a-spline-and-distance-and-speed-based-instead-time/2673447/12 "2025-11-10T15:59:34Z")

</div>

![resim](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/7/e/b7ee555fa77522160fe635ea90057d29fc38772b.png)This is kinda unrelevant but, this A and B keys are not working, is it because I didn’t set the pawn as a main pawn or something? I am very new to both game making and UE sorry about that.

---

<div class="post-metadata">

**Author:** ![NEYSE\_O001](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/neyse_o001/32/1139179_2.png) [@NEYSE\_O001](https://forums.unrealengine.com/u/NEYSE_O001)\
**Post date:** [November 10, 2025, 4:07pm UTC](https://forums.unrealengine.com/t/what-to-replace-with-timeline-component-to-get-the-character-going-both-ways-in-a-spline-and-distance-and-speed-based-instead-time/2673447/13 "2025-11-10T16:07:45Z")

</div>

I don’t understand. When I don’t set the gamemode it is moving by itself, with event begin play node, but when I set the gamemode it’s not moving.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [November 11, 2025, 8:17am UTC](https://forums.unrealengine.com/t/what-to-replace-with-timeline-component-to-get-the-character-going-both-ways-in-a-spline-and-distance-and-speed-based-instead-time/2673447/14 "2025-11-11T08:17:22Z")

</div>

You just need to enable input

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/e/e/9ee71f7fd1dc56cecf5d14485cae120fa556730b.png)

---

<div class="post-metadata">

**Author:** ![NEYSE\_O001](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/neyse_o001/32/1139179_2.png) [@NEYSE\_O001](https://forums.unrealengine.com/u/NEYSE_O001)\
**Post date:** [November 11, 2025, 1:25pm UTC](https://forums.unrealengine.com/t/what-to-replace-with-timeline-component-to-get-the-character-going-both-ways-in-a-spline-and-distance-and-speed-based-instead-time/2673447/15 "2025-11-11T13:25:01Z")

</div>

When I press play, the character is just spawning where I last leave the camera when editting. How can I get it spawned as attached to the spline? Also none of inputs are working.

 ![resim](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/5/9/2596ba56a7d498a664292a628d8fc54ceb6a5fb7.jpeg)

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [November 11, 2025, 2:32pm UTC](https://forums.unrealengine.com/t/what-to-replace-with-timeline-component-to-get-the-character-going-both-ways-in-a-spline-and-distance-and-speed-based-instead-time/2673447/16 "2025-11-11T14:32:49Z")

</div>

This button decides what happens when you press the play button

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/3/2/b32f329c5c404b5ed5a24821a3f694ae435d46df.jpeg)

Did you choose ‘current camera location’?

I don’t know anything about your setup, so why the player is not attached to the spline could have almost any reason 🙂

---

<div class="post-metadata">

**Author:** ![NEYSE\_O001](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/neyse_o001/32/1139179_2.png) [@NEYSE\_O001](https://forums.unrealengine.com/u/NEYSE_O001)\
**Post date:** [November 11, 2025, 3:00pm UTC](https://forums.unrealengine.com/t/what-to-replace-with-timeline-component-to-get-the-character-going-both-ways-in-a-spline-and-distance-and-speed-based-instead-time/2673447/17 "2025-11-11T15:00:03Z")

</div>

Default player start is not available. When I don’t set the gamemode its working with event begin play (only moves forward) but not working at all when I set the game mode and try to play it as the character. What sould I to to get it spawned as attached to the spline?

This is all the scene.

 ![resim](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/1/8/e18cf617d2c5ae8e73ad874012bcab148c64cb7d.jpeg)

And this is the character’ s components:

 ![resim](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/9/8/d98c3fa9025d9a482b9093014df3eb36a8b0c3b3.png)

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [November 11, 2025, 3:24pm UTC](https://forums.unrealengine.com/t/what-to-replace-with-timeline-component-to-get-the-character-going-both-ways-in-a-spline-and-distance-and-speed-based-instead-time/2673447/18 "2025-11-11T15:24:31Z")

</div>

The game mode doesn’t know anything about splines, it can only spawn at the player start.

You would need to code your player to find the spline and use it.

---

<div class="post-metadata">

**Author:** ![NEYSE\_O001](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/neyse_o001/32/1139179_2.png) [@NEYSE\_O001](https://forums.unrealengine.com/u/NEYSE_O001)\
**Post date:** [November 11, 2025, 3:31pm UTC](https://forums.unrealengine.com/t/what-to-replace-with-timeline-component-to-get-the-character-going-both-ways-in-a-spline-and-distance-and-speed-based-instead-time/2673447/19 "2025-11-11T15:31:03Z")

</div>

And how exacly can I do that?

---

<div class="post-metadata">

**Author:** ![NEYSE\_O001](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/neyse_o001/32/1139179_2.png) [@NEYSE\_O001](https://forums.unrealengine.com/u/NEYSE_O001)\
**Post date:** [November 11, 2025, 3:31pm UTC](https://forums.unrealengine.com/t/what-to-replace-with-timeline-component-to-get-the-character-going-both-ways-in-a-spline-and-distance-and-speed-based-instead-time/2673447/20 "2025-11-11T15:31:43Z")

</div>

By the way thanks for your help so far 🙂

[Next page](https://forums.unrealengine.com/t/what-to-replace-with-timeline-component-to-get-the-character-going-both-ways-in-a-spline-and-distance-and-speed-based-instead-time/2673447.md?page=2)
