# Get Tangent At Distance Along Spline Affected by Length

**URL:** <https://forums.unrealengine.com/t/get-tangent-at-distance-along-spline-affected-by-length/433861>\
**Category:** Blueprint\
**Tags:** splinecomponent, splinemeshcomponent, unreal-engine, bug-report, UE4, question, Blueprint\
**Created:** [September 15, 2018, 4:00pm UTC](https://forums.unrealengine.com/t/get-tangent-at-distance-along-spline-affected-by-length/433861 "2018-09-15T16:00:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_705e34d1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_705e34d1](https://forums.unrealengine.com/u/anonymous_user_705e34d1)\
**Post date:** [September 15, 2018, 4:00pm UTC](https://forums.unrealengine.com/t/get-tangent-at-distance-along-spline-affected-by-length/433861/1 "2018-09-15T16:00:33Z")

</div>

I’m using a Spline Component to create a road network.

In order to keep the road pieces from stretching/squashing, I’ve used “GetTangentAtDistanceAlongSpline” to get the start/end tangents of each piece.

However when I move the points of the spline too far apart, the tangents become distorted.  
The distortion happens when the distance between two spline points is greater than the length of one length of road.

![253809-splinepoints.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/5/c/95c3476ca1300642d41c7a73d837039fc3c47a12.png)

When the distance between two points is less than one length, the tangent seems to have less of an effect on any spline mesh created with it.

![253810-lessthanonelength.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/f/e/8fe5d8350180d9b207b78f4c0e0da16a38efe10c.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_705e34d1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_705e34d1](https://forums.unrealengine.com/u/anonymous_user_705e34d1)\
**Post date:** [September 15, 2018, 9:31pm UTC](https://forums.unrealengine.com/t/get-tangent-at-distance-along-spline-affected-by-length/433861/2 "2018-09-15T21:31:41Z")

</div>

Found a workaround.

It seems the length of the tangent is increased as the distance between points increases.  
(I’m not sure if this is intended behaviour)

Basically I just normalized the tangent vector and multiply it by the length of one road unit.

![253813-fix.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/b/0/7b0f94717b0c653ccd2c6943068b33178fe65cd5.png)

---

<div class="post-metadata">

**Author:** ![RVillani](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rvillani/32/1194572_2.png) [@RVillani](https://forums.unrealengine.com/u/RVillani)\
**Post date:** [April 2, 2019, 2:49pm UTC](https://forums.unrealengine.com/t/get-tangent-at-distance-along-spline-affected-by-length/433861/3 "2019-04-02T14:49:40Z")

</div>

Thank you!! You just saved me hours of guess work and debugging! ❤

---

<div class="post-metadata">

**Author:** ![Arty-McLabin](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/arty-mclabin/32/1012076_2.png) [@Arty-McLabin](https://forums.unrealengine.com/u/Arty-McLabin)\
**Post date:** [April 13, 2019, 10:47am UTC](https://forums.unrealengine.com/t/get-tangent-at-distance-along-spline-affected-by-length/433861/4 "2019-04-13T10:47:49Z")

</div>

thanks man, that helped me too!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_d7dcf766](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d7dcf766](https://forums.unrealengine.com/u/anonymous_user_d7dcf766)\
**Post date:** [March 3, 2021, 11:32pm UTC](https://forums.unrealengine.com/t/get-tangent-at-distance-along-spline-affected-by-length/433861/5 "2021-03-03T23:32:16Z")

</div>

Ditto for me in 2021!!

---

<div class="post-metadata">

**Author:** ![sajedn](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sajedn](https://forums.unrealengine.com/u/sajedn)\
**Post date:** [March 20, 2021, 7:27am UTC](https://forums.unrealengine.com/t/get-tangent-at-distance-along-spline-affected-by-length/433861/6 "2021-03-20T07:27:21Z")

</div>

You have saved me a lot of head ache! thanks!

---

<div class="post-metadata">

**Author:** ![TheWolf](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/thewolf/32/1036665_2.png) [@TheWolf](https://forums.unrealengine.com/u/TheWolf)\
**Post date:** [March 24, 2023, 7:28am UTC](https://forums.unrealengine.com/t/get-tangent-at-distance-along-spline-affected-by-length/433861/7 "2023-03-24T07:28:13Z")

</div>

Years later and this is still helpful, thanks!
