DistributedReplays
DistributedReplays copied to clipboard
Create win/loss statistic for 50/50
(Attempt to) determine the number of 50/50 challenges and their outcome, so that users could check their win/loss ration on these challenges.
Here is a proposed methodology for detecting and determining both 50/50 challenges, and the winner of these chalenges.
Given a ball hit, if within the next (n) frames the ball hits a player of the opposite team, check for 50/50. Requirements: Players A and B are within 45 degrees, opposing (facing) each other. ("simple" vector comparison between each car's forward axis). Players A and B are within a certain distance of each other (may not be needed). "50/50" hits are ignored for the next 500ms or so to prevent over representation in the case of a multi-bounce 50/50 between two players. Determination: Given the ball position before initial hit, and after the final hit within 500ms of the initial hit, calculate it's resultant movement vector. Compare this vector to both car orientations to determine the 50/50 victor.
I'm not sure if 3D Vector angle comparisons are the most accurate (or fastest) way to detect this though.
Potential issue(s): Accurately interpolating data and detecting ball hits properly with just the data available in the replay.