Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

119 Neutral

About stc.5421

  • Rank
  1. stc.5421

    Creating Bullet Holes

    Sorry for delay , use this: http://bulletphysics.org/Bullet/phpBB3/download/file.php?id=588
  2. stc.5421

    Creating Bullet Holes

    And what's your problem right now? Can you get information from RayResultCallback ?
  3. stc.5421

    Creating Bullet Holes

    Did you do intersect to your mesh by D3DXIntersect function?
  4. Simply transform your 3d position by view projection matrix . md3dDevice->GetTransform(D3DTS_PROJECTION,&pm); md3dDevice->GetTransform(D3DTS_VIEW,&vm); D3DXMATRIX vp; D3DXMatrixMultiply( &vp, &vm, &pm ); D3DXVECTOR4 posBase; D3DXVec4Transform(&posBase,&D3DXVECTOR4(m_positionVal.x,m_positionVal.y,m_positionVal.z,1.0f),&vp); posBase.x/=posBase.w; // Screen space X pos posBase.y/=posBase.w; // Screen space Y pos posBase.z/=posBase.w;
  5. stc.5421

    Creating Bullet Holes

    You don't need it , that create a quad align to the mesh face .
  6. stc.5421

    Creating Bullet Holes

    1- "p" is your intersected point 2- "v1,v2,v3" are your intersected face vertices 3- "N" is your face normal or you can calculate it from your vertices { A = v2 - v1 B = v3 - v1 N = normalize( cross( A , B ) ) } 4- Calculate your Up and Right vector { up = normalize( p - v1 ) right = cross( up , N ) } 5- "Q1,Q2,Q3,Q4" are your Quad vertices and can calculate like this { Q1 = p + up * scale Q2 = p - up * scale Q3 = p + right * scale Q4 = p - right * scale }
  7. stc.5421

    Creating Bullet Holes

    hey you can use a decal system like this http://www.humus.name/3D/VolumeDecals.zip
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!