Make Vertex/Face parent during runtime?

So I have a bullet object that, when shot in-game, creates a bullet hole upon impact and die. I have an animated enemy character who I want to react to the bullet when he is shot. My goal is to either have the impact’s bullet hole “stick” to the face of the enemy mesh that it hit (through vertex parenting) or parent itself to the bone that the face is following.

Possible?

thanks in advance for any help. if needed, I can post a blend, but its really messy.

vertex parenting wont help you here. The first thing that comes to mind is detecting what face of the mesh did you hit using the rayCastTo and then use bullet_hole.worldPosition = face.position + enemy.worldPosition.

Edit:
and use face normal to align the bullet_hole with the face

As Josip noted, vertex parenting wouldn’t work for a couple reasons.

  1. As far as I know, you can’t set vertex parenting within the game engine
  2. Even if you could, vertex parenting wouldn’t be what you want because the bullet hole wouldn’t rotate along with the face.

The solution would seem to be bone parenting, but again, you currently can’t do this within the game engine.

The way to get around this is to parent objects (usually just invisible cubes) to the bones outside of the game engine. These objects can double as hitboxes for your character so you can know what body part you’re actually hitting. When you cast your ray, it will hit one of these cubes, and you can parent the bullet hole to the hit cube.

To position the bullet hole correctly, you may still want to cast an extra ray that ignores the hitboxes to get the exact position on the character mesh you want to place the bullet hole.