x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Pawn sensing problem that I have no idea how to fix

Basically, I am creating a horror game and my enemy has a chase ai with pawn sensing and pawn perception. I have been following tutorials and don't know why this bug is occurring. When my character is in the sight radius of the enemy's pawn sensing it will not react and start to chase him and then sometimes it will. I have been trying to figure the issue out for around 4 hours and cannot find a solution to the problem. Another issue as well is how when I go out of the enemy's pawn sensing radius distance it still chases me.

Product Version: UE 4.18
Tags:
more ▼

asked May 15 '18 at 05:45 PM in Using UE4

avatar image

ryanthom100
1 1 2

avatar image SenToRious May 15 '18 at 08:19 PM

It keeps chasing you because you didn't set the Actor target to Null when the target is not in sight, I would assume that's the issue, for the first problem I would just print a message when a target is found to see if that's the issue or your AI tree.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

The first issue sounds like you have a task that doesn't have a "Finish Execute" node and stays stuck on it. Debug its behaviour tree, see where it's stuck.

Also, if you have a "TargetActor" that the AI is supposed to chase, make sure it's of type "Actor": https://youtu.be/nshHCycft4A?t=1837 (hear that "very important note here"? Yeah...).

The second issue sounds like you're not making the AI "forget" he saw you once you exit its line of sight (after a few seconds, preferably). There's a "Clear Blackboard Value" node with which you can clear the "TargetActor" mentioned above.

more ▼

answered May 16 '18 at 12:45 AM

avatar image

Andrei Despinoiu
255 4 9 12

avatar image ryanthom100 May 16 '18 at 02:46 PM

Hi I have fixed the second problem I was having but I still can't find a solution to the first problem

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question