# External file based location/rotation. Possible or not?

**URL:** <https://forums.unrealengine.com/t/external-file-based-location-rotation-possible-or-not/328406>\
**Category:** Blueprint\
**Tags:** unreal-engine, CPP, Blueprint, question\
**Created:** [August 12, 2015, 8:35am UTC](https://forums.unrealengine.com/t/external-file-based-location-rotation-possible-or-not/328406 "2015-08-12T08:35:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_19e3a3ed](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_19e3a3ed](https://forums.unrealengine.com/u/anonymous_user_19e3a3ed)\
**Post date:** [August 12, 2015, 8:35am UTC](https://forums.unrealengine.com/t/external-file-based-location-rotation-possible-or-not/328406/1 "2015-08-12T08:35:14Z")

</div>

Hello everyone,

I’m good with math, and I have experience in algorithms and programming. Also I have some experience in Unreal (UDK to be specific, I was a programmer and voice actor of the first PC game in my country).

I was assigned to make an app that will visualize the flight trajectory based on a file which contains all location (from GPS) and rotation info (pitch, yaw and roll) from a real airplane.

From my experience in UDK I’m sure that it will be ansomewhat easy task but I need some advice and quick tips so I wont waste time on wrong ideas.

So my main question is what options do I have? Can I generate a matinee from a file? Or I need to create a datatable and move an airplane to next point wit SetActorLocation? Or is there any other way?

---

<div class="post-metadata">

**Author:** ![ScottSpadea](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/scottspadea/32/1194682_2.png) [@ScottSpadea](https://forums.unrealengine.com/u/ScottSpadea)\
**Post date:** [August 12, 2015, 12:29pm UTC](https://forums.unrealengine.com/t/external-file-based-location-rotation-possible-or-not/328406/2 "2015-08-12T12:29:10Z")

</div>

you can use arrays of vectors, lerps, and setActorLocation / SetActorRotation nodes to animate objects:

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...

and you can load that vector data from a text file using functions found in CoreMisc.h:

```
FFileHelper::SaveStringToFile()
FFileHelper::LoadFileToString()

```

[https://docs.unrealengine.com/latest/INT/API/Runtime/Core/Misc/FFileHelper/index.html](https://docs.unrealengine.com/latest/INT/API/Runtime/Core/Misc/FFileHelper/index.html)

once you load the file into a string, you can parse it into an array of strings, splitting it at every comma, by using ParseIntoArray:

> **[Parse Into Array](https://docs.unrealengine.com/4.27/en-US/BlueprintAPI/Utilities/String/ParseIntoArray/)**
>
> Parse Into Array

> **[How can I write to text files?](https://forums.unrealengine.com/questions/27254/writing-to-text-files.html)**
>
> I'm working on a custom, artist-editable UI solution to replace Slate on our project, and as part of that, I need to write to text files (since we edit our UI layouts at runtime, and AFAIK there's no way to make permanent changes to the level objects...

> **[Read and Write data from text file](https://forums.unrealengine.com/questions/88289/read-and-write-data-from-text-file.html)**
>
> Is it possible to read and write data from a text file for example use the text files data ( exampletext ) and store it as a variable Player-\>Name = file; out put = hello, exampletext if that is understandable 😕

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_19e3a3ed](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_19e3a3ed](https://forums.unrealengine.com/u/anonymous_user_19e3a3ed)\
**Post date:** [August 12, 2015, 12:44pm UTC](https://forums.unrealengine.com/t/external-file-based-location-rotation-possible-or-not/328406/3 "2015-08-12T12:44:38Z")

</div>

So it is possible to read a file and create motion based on that data! Thank you very much!
