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"

AI Perception - Sight and Character Rotation Inconsistency

I ran into a problem with AI Perception sight. When a character with AI Perception is performing a MoveTo or RotateTowardBBEntry, the AI Perception sight cone instantly rotates toward the MoveTo (or RotateTowardBBEntry) location, instead of rotating with the character.

Link to video, watch closely as the sight cone snaps behind the character, and then the character turns toward the move to location: https://drive.google.com/open?id=0B2AWUrjeJCaHSk96VzgzOTNLbVE

This means that the player could be standing behind the character, and on the first frame of the character rotating, be seen by the character. This may seem subtle, but during gameplay is extremely obvious, and seems like the character saw the player when he shouldn't have.

Is there a work around for this? Is this a code bug?

Product Version: UE 4.11 Preview
more ▼

asked Feb 26 '16 at 08:08 PM in Blueprint Scripting

Breakobs gravatar image

50 8 15 17

(comments are locked)
10|2000 characters needed characters left

4 answers: sort voted first

I had the same problem in 4.10.4. After much searching around I've bumped into a simple solution. What I did to fix this issue was:


  1. Make sure your Controller is attached to the pawn (under Controller|Transform select 'Attach to Pawn')


  1. Uncheck 'Use Controller Rotation Yaw'

  2. Set your rotation rate to whatever you want

  3. Check 'Use Controller Desired Rotation' (you may have to unhide additional options under Character Movement)

  4. Set up your Event Graph to set the Controller's 'Control rotation' as Pawn's 'Actor rotation'. See attached image:

Rotating AI Perception sight

Hope it helps!

more ▼

answered Mar 01 '16 at 06:43 PM

B3RyL gravatar image

91 1 9 17

Breakobs gravatar image Breakobs Mar 02 '16 at 06:04 AM

Yup, this works!

I had seen steps 1, 2, and 3 under Pawn in another answer thread, and had already done those, but didn't know step 1 under Controller and step 4 were necessary.

Thank you so much, I really appreciate it!

Krzysiek_TATE gravatar image Krzysiek_TATE Jan 12 '17 at 12:40 PM

This almost helped me. After doing this, my character's AIController rotation is being aligned to the character's one only when he stops the movement. But while walking, it's rotation is aligned to direction of movement - as before. Any ideas why?

(comments are locked)
10|2000 characters needed characters left

I have the same problem, maybe it's a bug of the last versions.

more ▼

answered Feb 08 '17 at 12:01 PM

Mieticapre gravatar image

1 1 2

(comments are locked)
10|2000 characters needed characters left

AIPerceptionSight uses GetViewRotation() and GetPawnViewLocation() from Pawn.h to determine the sight location and rotation. Override these two functions and you are good to go.

more ▼

answered Feb 17 '17 at 01:28 PM

kcmonkey gravatar image

26 1 3

(comments are locked)
10|2000 characters needed characters left

I found a solution for this problem using only blueprints. You have to check "use desired controller rotation" in the character, and uncheck "orient rotation from movement". Then you have ti uses Set focus and set focalpoint to rotate the controller and so the character.

more ▼

answered Feb 27 '17 at 10:34 AM

Mieticapre gravatar image

1 1 2

(comments are locked)
10|2000 characters needed characters left
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