I'm seeking information on how to implement something. I have a ball on a moving platform. The ball has a position and momentum.
Here's a gif illustrating the situation:

So the way it works is, the ball detects when it touches a specific platform, and "childs" itself to that platform. When the platform moves, it will go through all its children and move them by the same amount.
My problem is, when the ball moves on a platform, it should accumulate momentum from the motion of the platform-- which should be visible when the platform slows down (or in some cases stops abruptly)
I've tried several things but always end up with an accelerating ball that zooms off in the direction of the platform. I've tried subtracting the component of the ball's momentum from the momentum that is going to be added but I still get an accelerating effect. In fact everything I try gives me acceleration in the direction of the platform's motion.
Can anyone explain to me what the right way is to deal with this problem?
-
-
- Edit to add some clarification:
-
In the interests of making this run on slower devices, the ball's physics are not complicated. The ball's main loop is a glorified version of mPosition+=mMomentum, with the player able to change the momentum.
When a ball is on a platform, all that happens is, the platform says "I moved n, therefore Ball->mPosition+=n" ... but I would be interested in hearing the "right" way to do this so that I can try to adapt it in such a way that it doesn't require a full hardcore physics simulation to run.