This project has moved. For the latest updates, please go here.

Collision response

Nov 19, 2007 at 9:49 PM
Hey all,

Yeah there i am again.... But i just suck so much at this kind of math although it should be pretty easy :S.

Anyway i had no option but to remove the geometry for this game. So i revamped my project and build in a per pixel collision detection for all my objects. (I dont have that many object in a scene so..)

So now i have the positions of 2 different object when they collide and i have the positions of where those two objectes collided. With those two collided positions i have the vector of the angle of the collision.

Now i am trying so calculate the impulse i should apply to those bodies, but without succes :(. I looked into the arbiter class but the math you are doing in there is just impossible for me to recreate, tried it but failed :P. Now i read a book i had lying here, implemented what should be working but it isn't (book has custom classes and c++).

Now my question is could you help me make a math calculation to calculate these impulses i should apply to my bodies? I think that that also would be a nice reference for other people who cant use the geomtery of farseer like me.

Thanks in advance! And cheers for your hard work on this nice enigne! :)