You were paid to do a job, but you also expect a cut of whatever future revenue it might achieve?
If it's in the contract then yes.
If you're wondering why it's in the contract, this is very common in lots of different business types.
Up front, there may not be a desire to make a huge investment. What if isn't a success? So you tell whoever is making , "hey, we'll pay you measely dollars now to make it, and pay you percent of money that comes in for it down the road." This way you can invest a smaller amount up front ensuring the thing gets made, but everyone involved gets a cut based on the future success.
Since the success/amount made isn't determined in a one-time deal, you pay out the shares of the success over time: aka residuals.