Sorry for the double post but I just had an idea for a system to count perfect laps:
zero, your collision spark system works with an "if" with a raycast collision argument, right?
Well, what if we make that condition add +1 to an integer, like:
Code:
var col_count=0;
if(collision is true){
col_count=col_count+1;
// I gotta think how to Reset col_count to 0 after a lap.
}
//check col_count after each lap and give the perfect lap message if col_count=0
if(col_count==0){
display(Perfect Lap)
}
Of course this is in pseudo-code... I think it's easier when you have the variables and specific commands for Unity...