
Collision detection via WorldMat & Mesh of two Obj.
I''ve some nice thoretical alg. of col.detection... but how to USE them???
The most alg. assumes that we got two meshes(or simpler objectes like triangles/shperes etc.) with position vectors which are absolut. Means that 0,0,0 lies exactly on the world''s origin!
My problem: I''ve a world matrix for all objects and the vertices of the objects themselfs are relativ to their OWN origin...
Should I multiply each vector of the bounding box(s) with their world matrices and do further calculations with the absolute ones?
(Sorry for my bad english I''m german as you see
)

Technically, to do the math, all the vertices of both objects need to be relative to a single point; it can be any point you want. But, when you find your collision point, or any other information that relies on the coordinate system, you have to remember that it was relative to the point you chose at the beginning. Additional transformations are needed.
Remember, to make something relative to point P from initial point Q (excuse my arbitrary naming conventions
), you add (Q - P) to each of the points being transformed. So if you had a point R(x,y,z) that was relative to Q(5,5,5) and wanted to make it relative to the origin - P(0,0,0) - then add (5,5,5) to R. Makes sense, eh?
Remember, to make something relative to point P from initial point Q (excuse my arbitrary naming conventions


This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement