Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added AI Perception implementation, removed Pawn Sensing. #50

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

saracen
Copy link

@saracen saracen commented Jul 2, 2018

I've been working my way through your excellent Unreal Engine 4 Mastery: Create Multiplayer Games with C++ course recently and figured I'd try swapping out the Pawn Sensing implementation for an AI Perception one.

It works quite well. However, it's not without issues:

  • The stimulus max age functionality doesn't really work. I don't think this impacts this game too much, because you get a similar game play experience with LoseSightRadius, allowing you to shake off a zombie by running further away. You cannot check to see whether a stimulus has expired in OnTargetPerceptionUpdated unfortunately. It could be made to work by getting additional actor info on every tick. But... not ideal.
  • The hearing config uses bDetectFriendlies = true as a bit of a hack. Not using this doesn't detect you as an enemy, because for some reason the hearing sense differs from the sight sense in that it doesn't use the AI Controller's GetTeamAttitudeTowards. I think this is a bug in the engine.

I don't mind if this doesn't get merged, however, it'd be great if you could let me know if this implementation is correct. If it is, at the very least hopefully it'll save somebody else some time figuring out how to swap out Pawn Sensing :).

@saracen
Copy link
Author

saracen commented Jul 24, 2018

Rebased for 4.20.

@tomlooman
Copy link
Owner

FYI I'm keeping this around (but not merging as you mentioned as well) for others to look into when using AI Perception. As that framework was never updated by Epic (and I've had some issues with it) I am sticking to Pawn Sensing for the project itself. Maybe in UE5 we can see some improvements, then I'll re-consider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants