# How to get Roll at spline point using local t param at segment of spline?

**URL:** <https://forums.unrealengine.com/t/how-to-get-roll-at-spline-point-using-local-t-param-at-segment-of-spline/360230>\
**Category:** Blueprint\
**Tags:** splinecomponent, splinemeshcomponent, unreal-engine, Spline, Blueprint, question\
**Created:** [June 9, 2016, 6:52pm UTC](https://forums.unrealengine.com/t/how-to-get-roll-at-spline-point-using-local-t-param-at-segment-of-spline/360230 "2016-06-09T18:52:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Am4zingHors3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Am4zingHors3](https://forums.unrealengine.com/u/Am4zingHors3)\
**Post date:** [June 9, 2016, 6:52pm UTC](https://forums.unrealengine.com/t/how-to-get-roll-at-spline-point-using-local-t-param-at-segment-of-spline/360230/1 "2016-06-09T18:52:12Z")

</div>

![94044-img_09062016_214916.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/1/6/216c7501aefc77bde789962a3fbcd5a83ec06a9e.png)

Hello there. Here is a deal. I have spline with n segments. Blueprint function “Get roll at time along spline” setting “t” parameter from 0 to 1 along all spline and returning roll at point. I need to get roll using local t parametr on segments. For example: ‘t’ will change from 0 to 1 not along spline. It will changing from 0 to 1 at spline segment. How to do this?

---

<div class="post-metadata">

**Author:** ![Slavq](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Slavq](https://forums.unrealengine.com/u/Slavq)\
**Post date:** [June 9, 2016, 8:55pm UTC](https://forums.unrealengine.com/t/how-to-get-roll-at-spline-point-using-local-t-param-at-segment-of-spline/360230/2 "2016-06-09T20:55:12Z")

</div>

I’ve figured out something, check this:

If you want to get spline Roll at 0.5 (or any other from [0.0-1.0] range) time between spline points, let’s name them point **A** and point **B** , then:

1. [Get distance](https://docs.unrealengine.com/latest/INT/BlueprintAPI/Spline/GetDistanceAlongSplineatSplinePo-/index.html) of point **A** and point **B** and save the values in _A\_Distance_ and _B\_Distance_ variables
2. Create a [Get Roll at Distance Along Spline](https://docs.unrealengine.com/latest/INT/BlueprintAPI/Spline/GetRollatDistanceAlongSpline/index.html) node for your spline
3. In the ‘Distance’ node input plug in a [Lerp](https://docs.unrealengine.com/latest/INT/BlueprintAPI/Math/Float/Lerp/index.html) node
4. In Lerp node, into ‘A’ input plug in your _A\_Distance_ variable and into ‘B’ input plug in your _B\_Distance_ variable. Into ‘Alpha’ input plug in your desired time, from 0.0 to 1.0.

This way you will get a roll at time between two specified spline points.

---

<div class="post-metadata">

**Author:** ![Am4zingHors3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Am4zingHors3](https://forums.unrealengine.com/u/Am4zingHors3)\
**Post date:** [June 9, 2016, 11:10pm UTC](https://forums.unrealengine.com/t/how-to-get-roll-at-spline-point-using-local-t-param-at-segment-of-spline/360230/3 "2016-06-09T23:10:50Z")

</div>

Thank you very much:) It works perfect!
