Added AI Perception implementation, removed Pawn Sensing. #50
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
LoseSightRadius
, allowing you to shake off a zombie by running further away. You cannot check to see whether a stimulus has expired inOnTargetPerceptionUpdated
unfortunately. It could be made to work by getting additional actor info on every tick. But... not ideal.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'sGetTeamAttitudeTowards
. 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 :).