When is the item I get from a box decided?

//ads -- adsterra.com -- native banner
?>
I've noticed that the worse your rank the better the item (it's fair I guess). However if I hit a ? box when I'm 10th and by the time the roll is done I'm 4th, will the item still be randomized as if I was 10th or will it take into account my new position ?
In other word : does passing other players lower the power of an item that is still randomizing (rolling), or is the roll already decided when I hit the ? box ?
Pictures about "When is the item I get from a box decided?"



Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Karolina Grabowska, Ketut Subiyanto, Ketut Subiyanto, Ketut Subiyanto