• Advertisement
Sign in to follow this  

Collision Response with multiple objects

This topic is 1928 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I hava a 3d map consisting out of triangles and player with a collision sphere.
it looks a bit like this:
http://ika.wdfiles.com/local--files/terrain-generation/Terrain.png
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?

Share this post


Link to post
Share on other sites
Advertisement
So you test every triangle by managing distances from old collision sphere position to where want to go position, you make a line (segment)
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 ___

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement