1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Store distance between driver and lead car/ai driver

Discussion in 'Racer Problems & Fixes' started by svetter, Jan 10, 2014.

  1. I hope that somebody has a fitting answer.

    I want to use the simulation for a study project and try to analyze the distance of the driver to a lead car. I want to calculate if people under certain conditions keep smaller/wider distance to this lead car.

    Can I somehow write more information about the AI_cars in the logfile?
    Or is that stored somewhere else (for example the position with the timestamp would be interesting, then I could calculate the distance)

    So far, I only found the possibility to store the ai_line_delta, but I dont know how these relate to the driver or the position of the car.

    Can I somehow relate the data from the AI files to the current position and time?!
  2. Maybe you can find some way to store the difference between the driver car and a ghost car. Don't know if this is possible but it is the first thing that comes to mind. Also, I seem to remember almost the exact same question asked about two months ago in here, you might want to look into finding some previous talk about this topic :)
  3. Hi William, you are right, I brought this topic up in another thread, but wanted to push it, since it was hidden in another topic without any replies.

    So your idea would be to take the ghost cars position and set this into relation to the log data? That might actually work

    Ill work on it.
    -> Record ghost car -> Receive positiondata from logfile for the Ghost. -> let ghost run in front with a certain time difference, take Position from ghost of the time difference and take it into relation to the current time.