# is there a way to generate a Curve Vector from an array of coordinates in the world space?

**URL:** <https://forums.unrealengine.com/t/is-there-a-way-to-generate-a-curve-vector-from-an-array-of-coordinates-in-the-world-space/794969>\
**Category:** Blueprint\
**Tags:** unreal-engine, editor, Blueprint, question\
**Created:** [March 20, 2023, 3:53pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-generate-a-curve-vector-from-an-array-of-coordinates-in-the-world-space/794969 "2023-03-20T15:53:22Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![TonyBaia99](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tonybaia99/32/634749_2.png) [@TonyBaia99](https://forums.unrealengine.com/u/TonyBaia99)\
**Post date:** [March 20, 2023, 3:53pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-generate-a-curve-vector-from-an-array-of-coordinates-in-the-world-space/794969/1 "2023-03-20T15:53:22Z")

</div>

Hi guys, is it possible to generate or fill a Curve Vector, from an array of vector xyz?? I need this to make sure that the motorbike follow a path in a specified time, such that speeds, accelerations and these things remain the same. Add all the key in the Curve Vector is impossible so is there a method to automate this process?  
If you also have other ways to solve this problem you can also write them here.  
Thanks in advance to anyone who will dedicate some of their time to me.

---

<div class="post-metadata">

**Author:** ![High500](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/high500/32/906557_2.png) [@High500](https://forums.unrealengine.com/u/High500)\
**Post date:** [March 20, 2023, 4:28pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-generate-a-curve-vector-from-an-array-of-coordinates-in-the-world-space/794969/2 "2023-03-20T16:28:22Z")

</div>

Hi @TonyBaia99

Maybe have a look at splines. You can plot the spline using the coordinates you have then you can get your actor to follow the spline including rotation.

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/2/3/023037b3765736bc5999a4c62122b190a676085f.jpeg "How To Make An Object Follow A Spline Path - Unreal Engine Tutorial") ](https://www.youtube.com/watch?v=-V6D5WtemMI)

He explains this very well

---

<div class="post-metadata">

**Author:** ![TonyBaia99](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tonybaia99/32/634749_2.png) [@TonyBaia99](https://forums.unrealengine.com/u/TonyBaia99)\
**Post date:** [March 20, 2023, 4:33pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-generate-a-curve-vector-from-an-array-of-coordinates-in-the-world-space/794969/3 "2023-03-20T16:33:28Z")

</div>

I already saw that video, but i need to build the curve that he use for the timeline with precise key, ad also a lot of key. I can’t add all the key that i need by hand.  
is there a way to automate the process of adding key to curve?  
Thanks for the reply.

---

<div class="post-metadata">

**Author:** ![High500](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/high500/32/906557_2.png) [@High500](https://forums.unrealengine.com/u/High500)\
**Post date:** [March 20, 2023, 4:40pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-generate-a-curve-vector-from-an-array-of-coordinates-in-the-world-space/794969/4 "2023-03-20T16:40:30Z")

</div>

Of course by blueprint, create a blueprint actor and add the spline component into it.

Then in the construction graph try using the following with your array of vectors

> **[Set Spline Points](https://docs.unrealengine.com/5.1/en-US/BlueprintAPI/Spline/SetSplinePoints/)**
>
> Set Spline Points

---

<div class="post-metadata">

**Author:** ![TonyBaia99](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tonybaia99/32/634749_2.png) [@TonyBaia99](https://forums.unrealengine.com/u/TonyBaia99)\
**Post date:** [March 20, 2023, 4:49pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-generate-a-curve-vector-from-an-array-of-coordinates-in-the-world-space/794969/5 "2023-03-20T16:49:56Z")

</div>

sorry I explained myself badly, give me one moment

---

<div class="post-metadata">

**Author:** ![TonyBaia99](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tonybaia99/32/634749_2.png) [@TonyBaia99](https://forums.unrealengine.com/u/TonyBaia99)\
**Post date:** [March 20, 2023, 5:01pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-generate-a-curve-vector-from-an-array-of-coordinates-in-the-world-space/794969/6 "2023-03-20T17:01:33Z")

</div>

![Screenshot 2023-03-20 alle 5.51.01 PM](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/a/0/6a0e06f1ac26fd70dd8981e77877a26356aa6356.jpeg)

I’m already doing what you see in the image to generate the spline on the map. For now i’m painting the spline by hand, after i will retrive the array Position from a C++ class.  
The problem now is that the motorbike that will move on the spline, it must do so with a specific point-to-point speed, each segment has its own average speed.  
In the photo below there is the part of the blueprint that i use to move the motorBike on the spline.

---

<div class="post-metadata">

**Author:** ![TonyBaia99](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tonybaia99/32/634749_2.png) [@TonyBaia99](https://forums.unrealengine.com/u/TonyBaia99)\
**Post date:** [March 20, 2023, 5:02pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-generate-a-curve-vector-from-an-array-of-coordinates-in-the-world-space/794969/7 "2023-03-20T17:02:08Z")

</div>

![Screenshot 2023-03-20 alle 5.56.44 PM](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/0/2/202328caa9c55309de8fa5741859384293998d2f.png)

---

<div class="post-metadata">

**Author:** ![TonyBaia99](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tonybaia99/32/634749_2.png) [@TonyBaia99](https://forums.unrealengine.com/u/TonyBaia99)\
**Post date:** [March 20, 2023, 5:02pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-generate-a-curve-vector-from-an-array-of-coordinates-in-the-world-space/794969/8 "2023-03-20T17:02:42Z")

</div>

![Screenshot 2023-03-20 alle 5.53.45 PM](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/d/3/0d31b968fd95bdfc812fad475555046fe2af7164.jpeg)

---

<div class="post-metadata">

**Author:** ![TonyBaia99](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tonybaia99/32/634749_2.png) [@TonyBaia99](https://forums.unrealengine.com/u/TonyBaia99)\
**Post date:** [March 20, 2023, 5:03pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-generate-a-curve-vector-from-an-array-of-coordinates-in-the-world-space/794969/9 "2023-03-20T17:03:13Z")

</div>

![Screenshot 2023-03-20 alle 5.57.07 PM](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/1/b/91bacadc3c9b727bdc95e7fef300cb5e92321968.png)

---

<div class="post-metadata">

**Author:** ![High500](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/high500/32/906557_2.png) [@High500](https://forums.unrealengine.com/u/High500)\
**Post date:** [March 20, 2023, 5:03pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-generate-a-curve-vector-from-an-array-of-coordinates-in-the-world-space/794969/10 "2023-03-20T17:03:42Z")

</div>

Ok what about having the spline points in an array and the matching speeds in a seperate array , matched by there index value, then iterate each vector and get the same matching speed from the array of floats with the same index?

Or even simpler an array of vector 4 and use the W as a float speed

---

<div class="post-metadata">

**Author:** ![TonyBaia99](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tonybaia99/32/634749_2.png) [@TonyBaia99](https://forums.unrealengine.com/u/TonyBaia99)\
**Post date:** [March 20, 2023, 5:10pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-generate-a-curve-vector-from-an-array-of-coordinates-in-the-world-space/794969/11 "2023-03-20T17:10:11Z")

</div>

Ok, good idea. But the how can i use that speed to move the motorBike from one point of the spline to the next? Should I change anything in the photos I sent? sorry the stupid question, but this is the first time that i use UE, I’m learning while using it, so I don’t know many of the functions.

---

<div class="post-metadata">

**Author:** ![High500](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/high500/32/906557_2.png) [@High500](https://forums.unrealengine.com/u/High500)\
**Post date:** [March 20, 2023, 5:12pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-generate-a-curve-vector-from-an-array-of-coordinates-in-the-world-space/794969/12 "2023-03-20T17:12:00Z")

</div>

Unfortunately im out onbusiness rihht now so im answering from my mobilr, makes it dofficult to read blueprints , i will look properly when im back but may not be til tomorrow. Unless somone else can look at your blueprints and translate what i said to it

---

<div class="post-metadata">

**Author:** ![High500](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/high500/32/906557_2.png) [@High500](https://forums.unrealengine.com/u/High500)\
**Post date:** [March 20, 2023, 5:13pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-generate-a-curve-vector-from-an-array-of-coordinates-in-the-world-space/794969/13 "2023-03-20T17:13:21Z")

</div>

Possibly the time to complete float value if thats being used as a speed?

---

<div class="post-metadata">

**Author:** ![TonyBaia99](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tonybaia99/32/634749_2.png) [@TonyBaia99](https://forums.unrealengine.com/u/TonyBaia99)\
**Post date:** [March 20, 2023, 5:18pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-generate-a-curve-vector-from-an-array-of-coordinates-in-the-world-space/794969/14 "2023-03-20T17:18:38Z")

</div>

Thanks a lot all the same, don’t worry. Tomorrow is fine too, I’m in no hurry. in the meantime I keep trying different solutions.

---

<div class="post-metadata">

**Author:** ![TonyBaia99](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tonybaia99/32/634749_2.png) [@TonyBaia99](https://forums.unrealengine.com/u/TonyBaia99)\
**Post date:** [March 20, 2023, 5:20pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-generate-a-curve-vector-from-an-array-of-coordinates-in-the-world-space/794969/15 "2023-03-20T17:20:26Z")

</div>

Ok, I’ll think about it for a moment and see if it could work. I’ve been looking for a solution for half a day and I’m really tired…

---

<div class="post-metadata">

**Author:** ![TonyBaia99](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tonybaia99/32/634749_2.png) [@TonyBaia99](https://forums.unrealengine.com/u/TonyBaia99)\
**Post date:** [March 20, 2023, 8:57pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-generate-a-curve-vector-from-an-array-of-coordinates-in-the-world-space/794969/16 "2023-03-20T20:57:30Z")

</div>

I try to rephrase the problem, maybe it can help. I have to make sure that the motorBike take 1/50 sec to go from one point of the spline to the next. So the more distance there is between the two points of the spline, the faster the bike will have to go.

---

<div class="post-metadata">

**Author:** ![TonyBaia99](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tonybaia99/32/634749_2.png) [@TonyBaia99](https://forums.unrealengine.com/u/TonyBaia99)\
**Post date:** [March 21, 2023, 5:20pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-generate-a-curve-vector-from-an-array-of-coordinates-in-the-world-space/794969/17 "2023-03-21T17:20:12Z")

</div>

Does anyone have any ideas, I still haven’t found a good solution.

---

<div class="post-metadata">

**Author:** ![Fairushit](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/fairushit/32/1086626_2.png) [@Fairushit](https://forums.unrealengine.com/u/Fairushit)\
**Post date:** [May 6, 2026, 12:12am UTC](https://forums.unrealengine.com/t/is-there-a-way-to-generate-a-curve-vector-from-an-array-of-coordinates-in-the-world-space/794969/18 "2026-05-06T00:12:06Z")

</div>

I think you should run a C++ code because you want to make an .uasset, then extract the float XYZ values and convert it to CurveVector.
