Jump to content
  • Advertisement
Sign in to follow this  
Trulezz

Collisions with many objects

This topic is 3804 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

Hi, (sorry for mistakes, I'm Polish :P) I'm trying to make a physics engine for my game, but I can't manage collision detection. I'm doing some simple AABB between a character and a box. It works fine until I try to load an object (.x file) containing two boxes (ex. buildings). I'm using D3DXComputeBoundingBox function, so it calculates the AABB's vertexes, but it treats a space between each box as a part of an object (so I can't move the camera there). My question is: do I really have to load each object from separate .x file? I read few articles about CD and I came across a method using "ray". Do you know anything about it? Or do you know any tutorials describing this method?

Share this post


Link to post
Share on other sites
Advertisement
Your problem is that you're using bounding boxes for such models. Bounding boxes are fine, but for such objects, they're clearly not the right choice. You may want to go for per-polygon collision checks - though keeping an early bounding box test is a good idea: if the camera doesn't collide with that, then it surely won't collide with any of the polygons, which saves some time.

Share this post


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

  • 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!