   D3DXIntersept wont work :(
  I added d3dxintersept into a very simple function that checks to see if the given ray intersects a mesh, and it didnt work...Here is my entire function: bool OsMesh::checkCollide(D3DXVECTOR3 pRayPos, D3DXVECTOR3 pRayDir){bool hit;   D3DXIntersect(m_pMesh, *pRayPos, *pRayDir, hit, NULL,NULL, NULL, NULL, NULL, NULL);   return hit;}and the compiler gives me this error message: error C2664: 'D3DXIntersect' : cannot convert parameter 2 from 'float' to 'const struct D3DXVECTOR3 *'...wai? I checked the d3dxintersept function and parameter 2 is supposed to be the ray's position thankyou in advancepirosan[edited by - pirosan on February 10, 2004 12:28:27 AM]
  Try using :bool bHit;DWORD dwFace;float fBary1, fBary2, fDist;D3DXIntersect(m_pMesh, &pRayPos, &pRayDir, &bHit, &dwFace, &fBary1, &fBary2, &fDist, NULL, NULL);return bHit;  You want to pass the address (&) of the rays, not the dereference (*) of them. ;  gah, well i changed it to that and now it complains, saying it "cannot convert parameter 4 from ''bool *'' to ''int *''";  Use BOOL instead of bool.neneboricua   [edited by - neneboricua19 on February 11, 2004 2:13:31 AM];  oh my gosh... it works!!thankyou very much!!!