hi, i’m trying to create all the logic for my game’s ai, i’m having a small issue.
i’m using the fps c++ template, i have used some functions in c++ for my player but i’m coding my ai with blueprints.
so far i have created a patrol behavior, my ai can see and hear the player, but the problem is when tha ai must fire to the player pawn, the ai fires but the projectile doesn’t collide with the player, i have already checked the hit and overlap events on the player and the projectile but without any results.
i have created a copy of the projectile blueprint from the fps template and i’m using it as the bullet for my enemies.
any ideas on what i need to do to fix this problem ?
The first thing I would check is if you are spawning a projectile blueprint is to look at the Mesh for the projectile and make sure it has collision enabled (you’ll need to open the Mesh asset in the Static Mesh Editor).
thanks for the answer, i already checked the mesh on the statich mesh editor it has simple collision enabled, the weird thing here is that the same bullet work just fine when i used it to fire the player’s weapon, but for the ai’s weapon is not working, i checked with a “print” node and the bullet collide with everything but not the player.
if there any flag on the proyectile from the fps template to avoid the collision from the player’s character?
Hey there !
I am experiencing the same issue as you. My bullet when used by the AI does not collide with the player but using the same bullet by the player, it collides with the AI pawn.
Did you find any fix or solution for this problem ?
the problem was that the bullet was spawning inside the weapon mesh, i move the location of the spawn point of the bullet a little and the bullet has worked fine.