• Advertisement
Sign in to follow this  

Collision detection between two meshes

This topic is 3879 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 am trying to put in an efficient physics system in my game and I have a question. I know I could be just using physx but I would rather try to do this myself for the learning experience. So my question is on how you can calculate collision detection efficiently between to meshes. I know I could just cast a ray from each vertex but I think that that would be extremely inefficient and time consuming. How can I do this? For an example of a situation to use this in is just a simple box falling onto a plane representing the ground. Currently I am casting a ray from the origin of the mesh (which is the point it sits on) and seeing if there is a collision. This works great but if I want the box to tumble and roll I will have to find collisions with all of the sides.

Share this post


Link to post
Share on other sites
Advertisement
There are several articles on collision detection on this site ("resources" tab). Perhaps that would be a good place to start.

Share this post


Link to post
Share on other sites
So apparently what I am attempting to implement is "rigid body dynamics". I don't want to begin with this however until I can actually get my collision detection working.

I think the type of collision I need is face to face collision but I'm not sure. I looked at the articles but could not find one that helped. I'm trying to make a physics simulator that works like havok or physx. Is this the type of collision detection that they use? Can someone please explain how they do collision?

Thanks alot!

Share this post


Link to post
Share on other sites
expect to take at least a year getting to the point where you are experienced enough to code a quality engine. Even then, it won't be up to the same level of quality of these commercial engines that have been in development for several years.

just letting know what your getting into.

Share this post


Link to post
Share on other sites
No I understand that I won't be able to have that quality. Maybe I phrased that last bit of my question wrong. I just meant to ask what type of collision they use so that I can pursue implementing a simple model of it in my engine. My main goal is replacing the point to surface I have now with the appropriate collision model.

Share this post


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

  • Advertisement