Collision Detection with DirectX9

Hi all,

I am writing a simple little shooter game (similar to asteroids). I am currently working on the upgrades for my space ship and one of these is a laser. I ave successfully implemented a laser which works nicely. However, the collision detection has not been working.

The laser displays but the the enemy ships do not get destroyed when the laser touches them. I get no error messages and am sure I am close but it just doesn't want to work! object1 should refer to the enemy ships as this code is the collision detection for the torpedoes hitting the enemy ships.

DirectX specifically does not handle collision detection. The D3DX library does offer some support from D3DXBoxBoundProbe() and other more exact and thus more expensive mesh/tri collision detection functions.

I suggest looking into open source libraries like Bullet for more accurate and more thorough collision detection and response.

Sorry, there is some code related to collision detection. As this program is being modified, and the collision detection function was already there, I largely ignored it as everything else seemed to work okay.