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"

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
Tags:
more ▼

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

avatar image

Breakobs
55 9 16 18

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

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:

Controller:

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

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

avatar image

B3RyL
101 1 10 20

avatar 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!

avatar 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
Viewable by all users

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

avatar image

kcmonkey
51 4 5

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

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

more ▼

answered Feb 08 '17 at 12:01 PM

avatar image

Mieticapre
6 3 3

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

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

avatar image

Mieticapre
6 3 3

(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