Collision Response with multiple objects
Members - Reputation: 125
Posted 07 October 2012 - 12:06 PM
it looks a bit like this:
I've Managed to reslove collisions with just one triangle.
But i don't get it to resolve with multple objects, the sphere sinks in the floor time to time when i just resolve every MTV.
So how can i make it right?
Members - Reputation: 239
Posted 07 October 2012 - 03:04 PM
you test if the every vertex and side [if sides are tested vertices may be forgotten] you test if this line is in the distance less or equal to the col sphere radius, you also need to test if the sphere allready intersects the triangle (or other poly like quad ;P) you can test if the line intersects the triangle but you must take care of one special condition , when
the end of the line (movement liine) is too close to tested triangle /
if collision found add to the stack
after doing this by all vertices you find the closest collision point and then apply the new position and you repeat the collisiobn [in ex 3 -4 times] test but well i don;'t know what exacly you will now test (i mean the movement line) or you just do sphere collision without movement ; ]
well to be honest i have written the code with this type of collision, but without repeating the collision because i do some different things now, and i faced the same problem and i remeber that someone told me that i need to repeat the process 3-4 times or even 12 ; ]
Edited by ___, 07 October 2012 - 03:14 PM.
Master & Mentor