Hi!
I’m looking for if there is a function that returns any location between two locations:
In other words, I want to get any point in the line from A to B.
Maybe I can use Bresenham's line algorithm - Wikipedia or to use VInterpTo.
Is there something already done in Unreal?
Arkaivos
(Arkaivos)
2
Yes, you can use Vector interpolation (lerp). From A to B. Using an alpha value between 0 and 1.
Alpha==0 will output position A.
Alpha==1 will output position B.
Alpha==0.5 will output the position that is right in the middle between A and B.
You just need to provide as many Alpha values as points you need from that segment.

2 Likes