Today I implemented the first class to generate contacts.
It is a Cable, which reister two particles, and make them bounce towards each other if they are far away. I've tested it and it works fine.
Obviously the real challenge will be to implement a collision generator between rigidbodies, but this is really useful to test that the collision resolver is working properly....and long story short, it quite isn't.
As you can see from the gif, the resolution is mostly fine: the impulses are correctly generated, and the engine avoids interpenetrations. However the biggest problem (which is clearly visible at the beginning of the gif) is that the resting code is not working as it should. The particles are interpenetraded, and placed back the next frame, which is the jitter problem that the resting code should avoid. Maybe the problem isn't even there, I'm having troubles understanding what is happening, I'll continue to test it tomorrow.

Nessun commento:
Posta un commento