So my npc pawn refuses to aim at me when it is firing from a high position when I move too close to it. However it will still shoot at me if I am far away enough. Been looking for answers or hints, but frankly, I’m stumped. Furthermore, not only does the npc not track me from a high position, the nature of the projectiles for some reason, looses its impulse and just floats. No clue on that part either. (more percisely, the whole npc faces me in a horizontal axis only, but I’ve assigned a bone that tracks me in all axis.)
Click here for a video of what I’m talking about.Enemy NPC sometimes has trouble shooting me when it is firing from a high or low position. - YouTube
this is how it is setup in the character blueprint. In here, the projectile spawns from the Bone(named HeadTop_End) i’ve assigned to the GetSocketLocation:
In here, I set a bone(named HeadTop_End) from the skeleton to track me, with the look rotation variable.
Here is the function that is associated with the look rotation variable. You’ll notice that I had to add +3 degrees on the y pitch of the break/make rotator, because without it, the NPC aims too low; at the leg area of the player. It’s a crude workaround, so if anyone has any ideas of how to make the enemy naturally aim at a higher postion of the player pawn, that would be great.
I’m also very open to a much simpler method of having the npc aim at me, if there is one. But from what I could tell, the problem I’m having is probably maybe in part due to the bone(named HeadTop_End) not tracking me anymore when the NPC is too high up and I move too close to it.