Originally Posted by
Bubba
This is a simple vector operation. You can do this several ways. One way is to raycast the bullet instead of having it become an actual object in the world. The raycast is the simple parametric form of a line or P(final) = P(origin) + shoot_vector * distance. Normally you could use the shoot vector to perform a ray intersection test with the bounding volume of your object. Once that passed you would then do a triangle intersection test on the mesh itself to see which ray the triangle hit. Once you computed that you would then compute the barycentric coordinates of the ray intersection within the triangle. From there you would then fire off some type of 'hit' message which would then deduct health, etc.