Hello! So, I’ve recently set up an AI that I can shoot and kill, However, I wanted to set up a headshot capability and I did, and it’s working, however, I’m using a Line Trace Component and it’s looking for a Sphere collision I have placed in the head socket of my AI’s Mesh, And when I spawn in multiple copies of my AI, the Overlap for the headshot ONLY works for one of them, not all of them. I’ve tried a lot of different things but nothing has fixed the issue. The line trace seems to stop working completely as soon as the AI that is actually listening for the trace is destroyed and the others do not receive the trace at all, I’m sure this is a simple fix, but I’ve spent way too long already trying to figure this out, Any help at all would be very appreciated! I fixed A similar problem with the overall hit and damage by casting to the AI, but I cannot cast to the component…
I can see two possible issues here: firstly in the way, you are spawning your AI’s. In theory, you would have multiple instances of the BP class for your AI. Also, I do not see a c++ tag do I assume this is Blueprints. I am not sure how to do this in Blueprints or if you even can, but ideally, you would go to the physics property of the mesh of your AI and change the head are to be a different Physics Material. Then when doing the cast, the weapon casting would see what surface was hit. It is was Flesh_Default (or whatever you call it) it would do the normal damage. However, if it hits a Flesh_Vulnerable (again whatever you call it), it would do Damage * 2.0f (or whatever your headshot multiplier is. Unless this is blueprints where I’m not sure this is actually possible, using a sphere collision for checking if you hit the head is not a very optimized way to do it. Sorry if this was just a load of jibberish and didn’t help at all, I am just speaking from the way I usually do things.