Can somebody explain me (I''m a beginner)the fundamentals of collision detection (and response to it)? I''ve read a horde of articles related to this theme and there are always instructions how to detect them generally, never used in any code. I know the methods how to detect collisions through perpendicular planes of triangle, but how to get the triangle to test it against? I''ve never seen this in an example in DX8. Thx
The collision detection really doesn''t have anything to do with DX8 specifically, and you should be able to adapt examples using different API''s, such as OpenGL or even an earlier version of DX.
Expect to spend some time experimenting for yourself.
The examples are out there, so perhaps I can help you to know where to look. The www.gamasutra.com web site is a good source---basically its the online version of game developer magazine. Try Jeff Lander''s article below. The second article points you to some University-developed software for collision detection, which you might use as an example to help you develop your own code.
http://www.gamasutra.com/features/20000210/lander_01.htm (2D) http://www.gamasutra.com/features/20000203/lander_01.htm (3D) http://www.gamasutra.com/features/20000208/lander_01.htm (a bit of physics)
And the corresponding source code examples. The 2D source code is a good place to start. The 3D source code is really just for calculating the axis-aligned bounding boxes, but together with the article it may be clear how to use it.