Collisions with many objects

Started by
0 comments, last by Captain P 16 years, 2 months ago
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?
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.
Create-ivity - a game development blog Mouseover for more information.

This topic is closed to new replies.

Advertisement