Original Post
alright, i am trying to use the D3DX8.Intersect function - its driving me nuts - for collision detection. for right now im trying to get it to work with shots hitting stationary, non-rotated buildings.
i tile my map into 10x10 units with a buidling in some.
pseudo code
shot is in tile x,z
building in tile x,z?
yes cool check for collision
matrixtranslation tileMartix, tilex*10,0,tileZ*10
matrixmultiply newworldmatrix, tilematrix, worldmatrix <- ive tried swapping matrix order
matrixinverse invworldmatrix, det, newworldmatrix
d3dxvec3transformcoord NewPos, origPos, invworldmatrix
newDir = standard cos/sin(origRadian) x z * 10
d3dx8.intersect buildingmesh, NewPos, newDir
basically trying to get shots vector in model space of the building, while maintaining its relationship.
ive tried all sorts of combinations with no luck. sometimes i get hits but it never makes sense.
thanks for any help you can give