I have the weirdest bug and i can’t wrap my head around it. Spent hours trying to solve it and i just don’t get it.
When i spawn Ai perception and pawn sense trigger once immediately if in range and then they always see the pawn no matter how far i go. As i understand they both get stuck for some reason and never update. So it’s like one tick and then it’s stuck. I just created a plain char blueprint and added both to that one and it works the same. I don’t understand what’s happening here like at all.
Same stuck happens if i start outside range. It never detects player actor afterwards even when in range.
Okay, i finally figured it out. It’s weirdly specific, no idea if anybody gonna have similar problem but will explain anyway. So my player actor is a pawn that’s being moved by physics like force and impulse. Physics are applied to the static mesh, not the actor as a whole. The thing is the root component of the pawn is not moving that way, it always stays at it’s “player start” position. The ball is moving but not the root. And pawn sensing and ai perception by default look at root position if i understand it correctly. So i just added a tick to the player blueprint that moves root to the balls position constantly. I’m guessing there is an option somewhere that does it instead but i can’t find it. If anybody has an idea how to link those without tick i would appreciate that.
Hi there @LonelyZero97,
This topic has been moved from International to Programming & Scripting: AI.
When posting, please review the categories to ensure your topic is posted in the most relevant space.
Thanks and happy developing!