Unreal Engine: Now Available to Everyone for Free

so if the game sold 3700$ on Q1, 2800$ on Q2, and 1200$ on Q3, would the total royalty be 5% of 7700$(all sales), 5% of 3700$(all sales from quaters which exceeded 3000$), 5% of 4700$(all sales - 3000$) or 5% of 700$ (all sales past 3000$/quater).