Putting the pawn sensing in the player character make it not to work

I’m trying to make a monster who moves only if the player doesn’t see it, so I put a pawn sensing in the player put it seems that make it not to work…I can’t even make it print the name of the pawns it sees…

Also, I’ve seen that in all the tutorials, the walls and the spheres placed in the world were not considered “pawns” by the pawn sensing…

Can somewone tell me what is considered as a pawn and why putting my pawn sensing in the player character make it not to work ?

1 Like

Hi there,
Because your character has a “player controller”, more than likely, you need an “AI Controller” to work with Pawn Sensing, and the actors need to be derived from a Pawn. If you add the pawn sensing component to a different pawn or actor, add an AI controller, then make it a “child actor component” of your character, you can use blueprint communication to get information from it using the logic inside your player character:
Get child actor component, get child actor, then cast to “your child actor BP”. From here, you can get its “Pawn Sensing component” and continue your code.

You can reparent other actors in your gameplay, going to class settings, Parent Class, and search “Pawn”.

Hope that clarifies.

1 Like