Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

KenMasters47

Vector / Triangle Collisions

This topic is 5733 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''m writing my collision detection routines at the moment and wanted some feedback on how i am doing it. Firstly i calculate a bounding box around every model in the scene. My first collision detection then checks the players new position against every bounding box. If a bounding box collision occurs i am going to use a ray tracing routine using the players last position and potential new position to check against every triangle in the box collision model. If there are no intersections (the player has walked through a door way in a house etc) then the player is moved else he isn''t. I also intend to use the same ray tracing algorithm to check for floor collisions but in this case i will allow some flexibilty. Ie if a collision occurs with the floor but the collision is only a small amount below the surface of the floor then the player will be moved upward slightly to the floor level. This will allow players to walk up hills and stairs. Does the above sound reasonable? My only worry is that checking every model''s polygons when the player enters the bounding box may kill performance. Any thoughts on this would be much appreciated. Cheers.

Share this post


Link to post
Share on other sites
Advertisement
Your implementation looks good, though i use ellipsoid, for the last step, once i''ve read a document about using an octree for a further test ,much like the visibility test for an octree, but i suppose this is usefull for static model , and when i say static i mean no animated models, or at least object cast from a single mesh.
byez and sorry for my english

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!