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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

[Solved] VR/AI Perception Issues

I have created an AI routine which is based on AI Perception. When testing with a normal third person character all goes well however when testing with my VR setup (Pawn with Floating Pawn Movement) the AI Perception is unable to properly detect the VR pawn. The location of the pawn is detecting as about 30 units off center and at floor level. This never changes regardless of the actual VR pawn position or height.

I assume this may have to do with the way "room scale" or "room center" is detected in the engine in relation to the headset position.

Does anybody have any insight or tips on this as I am at a loss for how to fix or offset this.

Product Version: UE 4.20
more ▼

asked Oct 31 '18 at 04:34 AM in Using UE4

avatar image

503 Development
3 1 2

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

2 answers: sort voted first

I was able to resolve this thanks to some advice I found on another (semi-related) answer.

I am still unsure why the original "perception source" for my VR pawn is way off but what I did was wait until my VR Pawn is spawned and then (via blueprints)

  • Spawn a trigger box component

  • Attach trigger box component to Camera on VR pawn

  • Get reference to trigger box component and store it

  • Use reference to "trigger box" component to react via my AI on perception events

This works just fine with seemingly no consequences. It even handles nicely when you "peek" around the corner as a VR character only triggering the AI perception when your head is visible. Thanks very much for your feedback as it encouraged me to investigate and find the answer.

more ▼

answered Nov 02 '18 at 02:10 AM

avatar image

503 Development
3 1 2

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

Do you have a collision object attached to the camera of your VR Pawn? I think the perception is using a linetrace and that should be able to hit something. The default VR Pawn has no collision objects attached.

If you would at a sphere collision as a child component to the camera ( see screenshot ), it will move with the HMD and the AI perception should be able to detect you.

alt text

Hope this helps.

more ▼

answered Oct 31 '18 at 02:21 PM

avatar image

156 11 20 30

avatar image 503 Development Oct 31 '18 at 03:58 PM

Thanks for the input! I had not thought of that. Unfortunately the issue persists. My VR Pawn has dynamic holsters attached to him (they are just scene components) and I am able to spawn, lock and position them very well.

For some reason though even if I add (and position) a sphere collision, including as a child of the Camera the AI Perception still tracks wrong.

It always detects my location as about 40 units off center of my actual location and completely at floor level.

(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