I can’t understand why something change in my blueprint… After this day, I had no problem with this node but for an obscur reason, now it’s not working properly ! I’ll become insane !!
I test it with a print string to check where is the issues and the only thing that I found it’s that this fonction is bugued. It change true to false everytimes instead of staying true as long as he sees the character
Hi, “On Target Perception Updated” will fire every time one actor than can be perceived will be sensed and was not sensed before, or was sensed before but is no longer sensed.
So if for example you are only using the sight sense, then every time one “Ganfaul_BP” actor will exit the sight of the AI, “CanSeePlayer” will be set to false.
Thank you for your answer. So, yes, this is what it’s supposed to happen. But, instead of setting it to false when the AI no longer sees the player, it sets it to false each time it is refreshed. More or less every second. which means that the AI keeps going from chasing player in behavior three to patrolling instead of staying chasing all the time it sees the player.
what I don’t understand is that it worked well before today. He was following the player correctly.
Ok, can you create a new node “Is Player Controlled”, where you would plug in the “As Ganfaul_BP” from the “Cast To Ganfaul_BP”, and print this boolean directly after the “Cast To Ganfaul_BP” and see if that prints true?
And how many “Ganfaul_BP” actors do you have on the map, only the player or also other AI?
Ganfaul_BP is only the player. I use the node is player controlled, and yes, stay on true. No problem with the detection of the player. That’s so weird
No problem with the detection of the
player. That’s so weird
So that I understand this correctly, if you use the “is player controlled” node as branch before continuing everything works as expected?
If so, that means your AI is sensing more than one “Ganfaul_BP” (you can use “get perceived actors”, that will return all the actors your AI is currently able to sense, use a for each loop and count the number of “Ganfaul_BP” to check this on tick).
Hmmm, interesting. What “Sight Radius”, “Loose Sight Radius” and “Peripheral Vision Angle” does your perception component have? (Although I’m pretty sure that’s not the problem)
And did you add anything to the player that could block the vision of the AI (so is blocking the visibility collision channel) and is not part of the player character?
Next thing I would try is use the default thirdperson character as player instead of “Ganfaul_BP” and see if the AI detects this properly to narrow the source of the problem down. Because if the AI detects it properly, then that would mean the problem is inside “Ganfaul_BP”. If the AI detects it not properly, then it’s either in the AI or the level.
Indeed, I don’t think it comes from the view settings since I set them back to default and it doesn’t work better. I had added a collision capsule but I removed it, without change.
I will try with the default mannequin. Oooh sadly, it’s not working too with the thirdpersonchar
But I already tried with thirdperson on default player because i don’t want to change anything in the behavior tree. I’m already on a un new map with nothing exept a cube for the floor
So i’ll try with the default player as AI tomorrow. Thanks for today BTW !
I tried with the Third person as AI and player char and it’s working perfectly.
So, I tried with ganfaul BP as player and it’s work also. So now, I know that is my enemy the probleme. Thank you !
However, I don’t know why “CanSeePlayer” is constantly going from true to false with “enemy_BP” and not with ThirdPersonChar
I don’t think so and I compared the third person and enemy_BP and I didn’t find any difference in the collisions. I searched through my code everywhere and I couldn’t find anything that could explain this problem.
I think I’m going to remake a character since I now know that it’s not my behavior tree that has a problem.
I don’t think so and I compared the third person and enemy_BP and I didn’t find any difference in the collisions. I searched through my code everywhere and I couldn’t find anything that could explain this problem.
I think I’m going to remake a character since I now know that it’s not my behavior tree that has a problem.
Also, I don’t think it’s the IA perception the problem since it works perfectly with other characters.
After several tests over several days, I found that it is in fact due to ANIM BP . So, I really don’t understand how it’s possible but I’m going to remake the BP anim step by step and we’ll see ^^"
I think the problem comes from the link between the animations and the BS but I can’t say what it is.
If I delete the variable “Speed” in the event graph of my Anim_BP, there is no more bug. If I remove the blendspace or set my enemy’s Anim_BP to “none”, there’s no more problem either.