I'm making a very simple physics engine based on momentum, and I'm solving what response to use for a collision from each involved object's frame of reference. However, something about how I'm interpreting frame of reference isn't quite right...
Consider the below example, with a 1g object moving 10 m/s toward a 10g object. No friction or rotation or anything complicated.
That 1g object eventually hits the 10g object. Now, my engine would then look at each object from its frame of reference (so its velocity, basically) and sum the external momentums on it (in case there are multiple collisions) and use that to change its own velocity. There's only 2 objects involved in this example to keep it simple.
So from the 10g unmoving object's frame of reference, the 1g object is hitting it with basically that same velocity vector (so 10 gm/s momentum). From the 1g object's frame of reference, the 10g object is moving toward it at 10 m/s and hitting it from the right with... 100 gm/s?? That doesn't make any sense!
I'm really messing up frame of reference here somehow... I need to use the frame of reference of each object, but I'm pretty sure that the momentum I'm getting in some of them is simply incorrect.
That 1g object, when doing some sort of equal response to that 100 gm/s momentum, would then get launched backward at 90 m/s (10 m/s - (100 gm/s / 1g))! I'd then calculate how the 10g object moves based on the momentum it sees, resulting in it moving forward at 1 m/s. Where am I going wrong here?