# What math to calculate an even play rate for movement along a spline regardless of length?

**URL:** <https://forums.unrealengine.com/t/what-math-to-calculate-an-even-play-rate-for-movement-along-a-spline-regardless-of-length/630738>\
**Category:** Blueprint\
**Tags:** unreal-engine, question, Blueprint, UE4-27\
**Created:** [August 18, 2022, 4:37am UTC](https://forums.unrealengine.com/t/what-math-to-calculate-an-even-play-rate-for-movement-along-a-spline-regardless-of-length/630738 "2022-08-18T04:37:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TorQueMoD](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/torquemod/32/710746_2.png) [@TorQueMoD](https://forums.unrealengine.com/u/TorQueMoD)\
**Post date:** [August 18, 2022, 4:37am UTC](https://forums.unrealengine.com/t/what-math-to-calculate-an-even-play-rate-for-movement-along-a-spline-regardless-of-length/630738/1 "2022-08-18T04:37:35Z")

</div>

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.

 ![SplineMesh](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/8/3/683652e9115d78ddbee793ed0095d85f3873670e.png)

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 consistent speed? The mesh that I’m moving along the spline is a flying drone, and I want it to look like it has a specific top speed so to speak. Rather than just eyeballing it, I figured there’s probably an equation involving the length of the spline and my desired movement speed that I can use to calculate it precisely. I just suck at math so I have no idea what that would be 😛

---

<div class="post-metadata">

**Author:** ![Tuerer](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tuerer/32/1008648_2.png) [@Tuerer](https://forums.unrealengine.com/u/Tuerer)\
**Post date:** [August 18, 2022, 7:43am UTC](https://forums.unrealengine.com/t/what-math-to-calculate-an-even-play-rate-for-movement-along-a-spline-regardless-of-length/630738/2 "2022-08-18T07:43:37Z")

</div>

Duration in Seconds = Spline Length / Desired Velocity

---

<div class="post-metadata">

**Author:** ![TorQueMoD](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/torquemod/32/710746_2.png) [@TorQueMoD](https://forums.unrealengine.com/u/TorQueMoD)\
**Post date:** [August 18, 2022, 7:26pm UTC](https://forums.unrealengine.com/t/what-math-to-calculate-an-even-play-rate-for-movement-along-a-spline-regardless-of-length/630738/3 "2022-08-18T19:26:42Z")

</div>

OMG is it really that simple? LOL. I was asking my buddy who’s good at math and describing the problem to him (he doesn’t know game design) and at the end of it I said Spline Length divided by Speed = duration of timeline (I know this isn’t the equation, but I need that).  
So apparently I instinctively knew the answer? ha ha

Thanks!
