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"

4.11 VR Camera - Lock to HMD - Broken First Person VR

The new Lock to HMD functionality of the new Camera Component seems great. It allows me to know where the camera's location is without doing some math. It also lets me attach objects to the camera without doing math on tick. This is great, but it's also totally ruining my First Person VR.

For first person VR: I add a scene root, attach a camera, and check User Pawn Control Rotation as suggested in the new docs. Unfortunately, this makes for completely vomit inducing VR. Now when I turn my head, my camera turns with a relative offset to my player pawn as it turns - the offset is based on my HMD's tracked location.

Am I doing something wrong?

Thanks in advance!

Product Version: UE 4.11 Preview
more ▼

asked Apr 01 '16 at 12:00 AM in Blueprint Scripting

avatar image

165 16 20 22

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

1 answer: sort voted first

I ran into this, as well.

The problem was that the automatic HMD tracking stuff didn't take into account the rotation of the pawn. If your pawn is rotated in any axis (most likely yaw from your player spawner being rotated in the level) then you'll end up with the HMD tracking axes being misaligned.

Just make sure your camera component's parent component is always aligned with the world axes and you should be okay.

In the likely event that you need to rotate the pawn (for seated experiences, for example) I posted a fix as part of a bug report on this issue here.

The easiest thing to do for now would be to make your own CameraComponent which extends the basic CameraComponent, and override the broken GetCameraView function with one that includes the fix above.

more ▼

answered Apr 09 '16 at 06:09 AM

avatar image

639 27 29 57

avatar image Superfunkstar May 05 '17 at 05:59 PM


Just make sure your camera component's parent component is always aligned with the world axes and you should be okay.


How do I do that? I have the problem in my fps bp in VR. I need the lock functionality in order to navigate UMG buttons using head movement.

avatar image Teiwaz May 05 '17 at 07:13 PM

You just don't rotate anything which the camera component is attached to. What version of the engine are you using, though? I'd have thought they'd have fixed this by now.

avatar image Superfunkstar May 08 '17 at 09:12 PM

I'm using the latest version 4.15.2. The problem of misalignment starts when I rotate using my controller, then stand still and move my head fw/bw or bend it. I'll check my camera settings this week and get back to you. Thanks for the update.

avatar image Teiwaz May 08 '17 at 09:56 PM

I looked up the bug which was filed when I reported this issue in the bug reports category (https://issues.unrealengine.com/issue/UE-29579) and it's been marked as "by design" which seems... odd... but also means this isn't likely to get fixed. (That said, the bug based on my report doesn't do a very good job of describing the issue)

I posted a code change which fixes this problem above. Given that the fix was made by messing with the late update code for the camera it might have other negative effects, though, especially since that change predates ansynch spacewarp.

(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