Iracing - lapped car
Guys, how can I get info if certain car is in the same lap as me or not? Immediately - not on start/finish line - like it works with relative positions in black box.
Trying to implement color indication of lapped cars (like blue/red relative in iracing). Can't find appropriate property.
Try using the gap value from the tracker. PersistantTrackerPlugin.DriverAhead_XX_Gap
And compare it to your best lap time. DataCorePlugin.GameData.BestLapTime
Something like this:
Gap / Best > 0.5
Gap / Best < 0.5
Thanks for reply, but I don't get the idea.
PersistantTrackerPlugin.DriverAhead_XX_Gap shows actual gap without lapping (I checked 🙂 ), so lapped car just in front of me will have gap of lets say 1 sec. How comparing it to best time can show me lapping?
Am I missing something?
I think this function gives the total gap: drivergaptoplayer(raceposition)
Maybe that's what I was using. I can't remember for sure.
It seems to work!
Still little issues, but fine in general - thanks!