- Home /
Trail Renderer with historical GPS data from Sqlite DB
I have a question on my method for doing this thing:
I need to draw a trail of a GPS tracked device (n hours back). At first I thought I'd store the GPS data in a Sqlite DB with timestamps, query the database for GPS positions less than n hours old and draw the trail using a Line Renderer.
Then I found the Trail Renderer and figured that could save me some time. However it isn't exactly designed to draw a trail based on some historical data in a database, but instead based on a objects movement in the 3D world. So, I'm going to try and create an Empty GameObject and move it in the 3D world based on the GPS data from the DB (all in the same Update call). My hope is that several movements in the same Update call works with the Trail Renderer. If not I'll try one move in each Update call or may be falling back to using a LineRenderer.
My question is: Do any of you clever minds know a better way to do this? Or have any suggestions for improvements?
Thanks
EDIT: Just in case anyone wants to do the same. Creating an empty game object and changing it's transform.position based on historical data works fine. If you only change the position once for each Update() call you even get a nicely animated trail.
Your answer

Follow this Question
Related Questions
How to disable the "Billboard" function in TrailRenderer? 1 Answer
TrailRenderer sorting layer problem. 2 Answers
Creating an infinite trail that can be collided with 2 Answers
Is possible to save a trail rendered to load again after? 1 Answer
How to get Zerg Tentacle-like effect (see example in post)? 1 Answer