[Algorithms] OBBs & Max
Brought to you by:
vexxed72
From: <Nik...@ao...> - 2000-07-27 06:21:20
|
Recently, I've been creating an OBB collision detection system for my engine, and I loosely used the RAPID library as a guide when creating my own functions. The data that I use originates from 3D Studio Max 3.1. I have been having much difficulty with the accuracy of the system, so I attempted to use the RAPID library itself to see if that functioned correctly. However, the RAPID library is giving the same results as my own, it inaccurately reports collision with even the most simple models (such as two boxes, in which only one has rotation). Is there a problem with the library, or with Max? The data I am receiving from Max displays correctly when rendered with D3D (in the exporter I change the coordinate system from Max's to D3D's). Could this change in coordinate systems be the problem? In this transformation, I change the order of the vertices on each face, and I flip rows 2 and 3 in the transformation matrix, along with the y & z coordinates in the matrix and the vertices. Also, when a box is created in Max, it is defined with the center being at the bottom of the box, and the rotation and translation matrix compensate for this (depending on where the pivot point is located), to make the scene look correct. (As I mentioned earlier, the when I render this data in D3D, it looks exactly like what it did in Max, in addition, the collision detection is accurate if neither model is rotated. Any help would be appreciated. Thanks, Nik...@ao... |