How do you find the rate at which an object recives a peramitter.

Lets say you have Object A, B and C. Object A and B are sending blue balls at Object C. A sends 4 the first second, 10 the second second, and 50 the 3rd second and so on. Object B is sending 2 blue balls per second.

How would I find at what rate object C is collecting blue balls?

I can figure out the code if I understand the logic.

Receive rate = Balls collected / Time

Sort of like a FPS counter but you’re counting balls per second now.

if you have a Collider on Ball C you could count the incoming balls with OnCollisionEnter and then calculate in the Update.

http://wiki.unity3d.com/index.php?title=FramesPerSecond