Iracing - lapped ca...
 
Notifications
Clear all

Iracing - lapped car  


nirat
(@nirat)
New Member
Joined: 5 days ago
Posts: 3
Topic starter  

IRacing

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.


Quote
Romainrob
(@romainrob)
Eminent Member
Joined: 1 year ago
Posts: 44
 

Hi.
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


ReplyQuote
nirat
(@nirat)
New Member
Joined: 5 days ago
Posts: 3
Topic starter  

@romainrob

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?


ReplyQuote
Romainrob
(@romainrob)
Eminent Member
Joined: 1 year ago
Posts: 44
 

@nirat
Hi,
I think this function gives the total gap: drivergaptoplayer(raceposition)
Maybe that's what I was using. I can't remember for sure.


ReplyQuote
nirat
(@nirat)
New Member
Joined: 5 days ago
Posts: 3
Topic starter  

@romainrob

It seems to work!

Still little issues, but fine in general - thanks!


ReplyQuote
Share: