Original Post
Have some strange problems. Some models computes BBox normal, but others are like half sliced. It seems that models are different in some files. So a few screens first: Good one:
Bad one:
Code from which I compute BBox: Any suggestions?
Bad one:
Code from which I compute BBox:
BYTE* pVertices=NULL;
Model->LockVertexBuffer(D3DLOCK_READONLY, (LPVOID*)&pVertices);
D3DXComputeBoundingBox((D3DXVECTOR3*)pVertices, Model->GetNumVertices(), D3DXGetFVFVertexSize(Model->GetFVF()), &minBounds, &maxBounds);
Model->UnlockVertexBuffer();
D3DXCreateBox(D3D9, maxBounds.x-minBounds.x ,maxBounds.y-minBounds.y,maxBounds.z-minBounds.z, &BBox,NULL);