- Home /
Export camera path (first person controller) in x,y coordinates
Hi - I am looking for a script that will allow me to export the movement path (camera path) from a first person controller in x,y coordinates. I am really new to scripting so I will need some help implementing this if possible. The idea is that I want to create a game that after the person is done playing I have record of where they walked in x,y coordinates. Maybe as an excel export?
Thank you,
Vic
Answer by fireDude67 · Jan 15, 2011 at 01:29 AM
From a top-down perspective, you would simply grab the X and Z coordinates because Y is up/down. Then every frame, in FixedUpdate
add the current transform.position
to an array of Vector3's
.
Hey - Thanks for the quick reply but i think I need more help than that. What I am trying to do is to do is to create a script the will record the x and y coordinates of the first person player (or camera attached to it) while it walks around the environment and for these coordinates to be saved in an excel file once you stop playing the game. I am desperately trying to get something like this working for a project I am currently working on and while I am pretty good at designing virtual worlds, my knowledge of scripts is shameful :) Any help of examples I can download is greatly appreciated.
Answer by Socrates · May 06, 2011 at 03:32 AM
If you want to export the data to Excel, look up information on CSV (comma-separated values) file format. It is basically a text file where each data point is separated by commas. Excel can import and export this file type easily. It has no formatting, but it will have your data.
You can find the basic specs on Wikipedia.