Asked a million times.

Blitz3D Forums/Blitz3D Programming/Asked a million times.

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Don't use Camerapick. Use Linepick to do a line from the front of the player, to infinity (well, a long way, anyway). If the first entity it hits is a enemy, you've got to deal the damage. IF however, it hits the map first (ie, a wall), then use the
PickedTri() command to detect which triangle it picked on which surface, etc.

Then use AlignToVector to put the bullet hole sprite flat up against (but just out.. say, 0.0001) from the wall. It'll be a little more complicated than that. You'll have to find out which way the triangle is facing (based on which way the verts connecting it are connected, relative to the player) to figure out which side to put the decal on - but it's relatively straight forward.

Make sure your map mesh has EntityPickMode enabled on it, otherwise the linepick (or camerapick, etc) won't pick it. >_<

Hope this helps.

+BlackD