Stimulis source full bug. Please help me ! 3 days on this sh**

Hello,

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.

Hello,

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).

first of all, thank you to take this time to help me !

But, like I said, it stop to see de player (ganfaul) for no reason. So, I try your test, and the result is that it change from 0 to 1 every time.

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

Ok i’ll try it tomorrow !

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 !

Ok, then I would try

(1) again with default thirdpersonchar as player and also in a new blank map where you would only add lightning and a default landscape

(2) the settings above but also with the default thirdpersonchar as AI

If both does not work, then I would check the project settings/migrate to a blank project and try there.

Hello again !

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

Does your “enemy_BP” reparent from pawn, or from character?

And do you have anything inside of your “enemy_BP” that could block the vision of the AI but does not belong to the AI?

And you can debug your AI Perception that might help AI Perception | Unreal Engine Documentation at the bottom.

“Enemy_BP” is an actor type “Character”

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 ^^"

Okay, I’m going crazy. I really don’t understand what’s influencing this! Does anybody understand it?

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.