Hello all, I've observed some weird behavior on my physics engine that I think is not a bug but a limitation of how constraints are usually defined and implemented in physics engines. But I might have understood the whole theory wrong so I'd like to hear your opinion on it.
So, let me present my case with a simple example: imagine we have a static wall (no constraints, just static geometry) and we throw a ball at it. Given that the wall is static all the collision energy is transferred back to the ball which ends up doing all the bouncing back
Now, lets replace the wall by a dynamic object of the same shape but with a finite mass and a fixed/weld constraint to make it static. So now when we throw a ball at it this is what happens in a sequential solver:
The energy of the impact is transferred to both objects according to their mass ratio and the objects start moving away from each other
The wall is now moving which violates the fixed constraint, so the constraint kicks in to apply an impulse that negates that velocity and make it static again
The wall is now static and the ball is bouncing back like the first scenario, but the ball is moving slower than before because only part of the collision energy was transferred to it
So, essentially, the problem is that the constraints correct and negate invalid motion but don't necessarily react to the forces that caused the violation. In some circumstances, the sequential impulse solver might still apply additional collision impulse to the ball, but it will never be the full collision energy as if the wall was really static.
Is my understanding correct or am I missing something?