So I’m making a stealth game where you can stealth knock out people, And I made it so that if another AI saw the other knocked out AI it’ll print string saying “It saw it“ or something like that.
And It’s working well. But here’s where the issue comes in. When I drag the other AI behind like a wall in another room behind a blind spot, the other AI still somehow sees the knocked-out AI, despite It being in a whole different room, behind like a corner which shouldn’t be able to be spotted.
Have you checked the collision settings on the wall? If it isn’t set to the right settings your pawnsensing component might not recognize it as a solid wall.
Well I have, the wall collision preset is actually “blockalldynamic”. Should’ve clarified before, My bad. I’ve checked on other meshes aswell and it does the same thing. So I don’t rlly know what to do. Btw sorry for the wait
My first thought was that the wall isn’t set to block vision (or whatever channel your AI is using for sight).
But I had another thought-
You want to make sure the wall itself has a collision component. If it’s a brush it likely won’t work until converted to a static mesh, opened, and at least given a simple quick collider box!
Well, I think everything is set up correctly and I do have a “staticmeshcomponent” in the wall itself, If that’s what you mean? Also to clarify! I am not using brush geometry, I had the same feeling as you and had a look for myself, and I used The Cube from “Basic”. And It’s still not rlly working out
But thank you for pointing that out tho!
I’ve rlly tried everything I know. But I don’t rlly know how to fix this.
If u got anymore suggestions pls do say so.
Otherwise, I think I might just go with your line trace idea if I can’t find any solutions
I’ve found out that the NPC can’t detect the player if their behind the same wall, Both are using the same code. Just instead casting to the Player_BP. And the player is perfectly invisible.
I think it could be a different issue instead of collision issues
Well, my downed AI can’t sense anymore, Cause It’s “PawnSensing” Component gets destroyed apon its death. And I made sure even if it wasn’t destroyed It wouldn’t work cause I made a branch for the pawnsensing not work if the “Downed” Var = true. So I doubt it’s self sensing.
And as for hearing, I did set up hearing. But It’s got totally different “Print strings” from the seeing, and It isn’t even apart of the “PawnSensing” Component, It’s an AI Perceptive. So in short, if the player makes a sound, won’t detect the player or npc, just the sound and go to it.
I do think line tracing will be my solution! Agreed!