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"

Camera below the floor on level load (on Oculus Rift)

Hi everyone!

The problem

When I run a game in VR and load another map the camera gets stuck way below the floor, even though the pawn's location is the same. It looks fine on the first map that starts when preview starts, but gets messed up after opening a level.

This issue happens only when using Oculus Rift (I am using CV1) and UE 4.18. Everything looks fine in Vive on 4.18 and in both headsets on 4.16 and 4.17. What is more annoying is that in the problematic case loading a level takes so long that packaged build just gives up after 30 seconds.

What I have tried

To see whether this is fault of maps I am using or VR pawn I have been developing I tried to import pawn blueprints straight from the VR template to a project with only these maps and I have also built two basically empty maps (one has slightly rotated floor just to be different).

Result

When using Rift (on 4.18), the camera gets stuck below the floor after loading a level once and stays that way for subsequent loads until restarting the preview. Navmesh shows up properly and pawn actor's location also is no different from when the camera is on the right height. Teleportation marker is shown also on the proper level. It is just the camera that is too low (180 units if I recall correctly).

When it works fine

On 4.16 and 4.17 in both Vive and Rift and on 4.18 in Vive.

Finishg words

From what I've seen, lots of people seem to complain about 4.18 and its VR support, so it seems like I am not alone, however due to work circumstances I am not able to rollback to 4.17, so I would love to get some support on fixing the issue here, on 4.18.

Product Version: UE 4.18
Tags:
more ▼

asked Dec 18 '17 at 05:27 PM in VR

avatar image

Maryushi3
6 1 2 5

avatar image vr_marco Dec 20 '17 at 09:02 PM

If you converted a project based on the VR Template from 4.17, there was a known bug on the detection of the Oculus Rift such that the Tracking Origin was not properly set to Floor Level. That resulted in the camera being stuck on the floor.

Another possibility is that your Pawn is somehow not setup correctly or you forgot to set the Tracking Origin which, on the Rift, defaults to Eye Level.

Can you post some screenshots of your Blueprints, especially the setup of the VR Pawn?

avatar image Maryushi3 Dec 21 '17 at 09:52 AM

I know about the change from "OculusRift" to "OculusHMD" when setting up the tracking origin. The only other part of my pawn's setup is just teleporting it to a nearest floor, so I do not think that is the culprit. I attached screenshots of these two parts. alt textalt text I will just reiterate that eye level gets messed up only after opening another map during gameplay (which is preceded by extremely long loading time), and only on Rift.

Also, the problem does not exist during first preview in editor, only in every subsequent preview session and always in packaged build.

After few more minutes of searching I found out that tracking origin is indeed not being set properly in problematic cases, even though "Get HMD Device Name" returns correct value and "Set tracking origin" seems to execute on pawn's begin play after level loads.

avatar image vr_marco Dec 21 '17 at 11:02 PM

If you want to share your project or part of it showing the issue I am happy to take a look. I also see from your Blueprint that you are teleporting the Pawn to the linetrace impact point. Depending on how your pawn is setup, this may offset its Z world location and place it lower on the floor. Try to preserve its current Z world location when teleporting and just alter X and Y.

avatar image Maryushi3 Dec 22 '17 at 09:47 AM

I am not really able to share my project too much, so I will have to skip on your offer.

However, from what I have seen yesterday, it seems like after these problematic long level loads, tracking origin is not being set to "Floor level". Forcing it to this value fixes the wrong camera offset but it does not fix unbelievably long loading times (which are the bigger problem). So it is likely not caused by a mistake in, let's say my code. I have no idea what to do for now other than "dropping" support for Rift temporarily and counting on 4.19 to resolve the issues.

avatar image vr_marco Dec 22 '17 at 12:22 PM

If you suspect your project to be somehow corrupted (e.g. long loading times), you can try to Migrate... your levels to a new one and see whether this fixes it.

avatar image Maryushi3 Dec 22 '17 at 12:25 PM

I have tried migrating the levels to a clean project made from VR template and I have also tried migrating unedited VR template blueprints to a project containing empty test levels. Nothing has helped.

The problem still exists in today's promoted git release of the engine.

avatar image vr_marco Dec 22 '17 at 02:03 PM

Then I am out of suggestions sorry! Try to open a Bug Report and have someone from Epic look into it. This said, if you are not able to produce/share a sample project showing the issue, I am afraid it is going to be difficult for everyone to try to help you. Good luck with your project.

avatar image Maryushi3 Dec 22 '17 at 03:50 PM

I completely forgot that there should not be a problem if I share the empty test project I have made. Will do so after Christmas :)

avatar image vr_marco Dec 22 '17 at 03:56 PM

All right, happy holidays!

avatar image haowang1013 Jan 10 '18 at 11:05 AM

Note that the stall doesn't seem to happen in cooked game, nor does it happen if the maps used are very simple. Before I figure how what the actual problem is, our temporary solution is to disable the Oculus splash code path in the editor...

avatar image Maryushi3 Jan 11 '18 at 10:20 AM

Wow, that is a reply I have not expected. Disabling this Oculus splash thing does indeed solve the problem! This definitely qualifies as the best answer :)

I am not sure however what exactly I am losing by doing that...

By the way, in my case, this long execution was happening even on maps as simple as just cube, light and pawn and/or in fully cooked and packaged game.

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

5 answers: sort voted first

We're having the same problem in the project and I've tracked the issue to a very long call to ovrp_WaitToBeginFrame in the Oculus splash code. I timed the code around the call like this:

 auto beginTime = FDateTime::UtcNow();
 ovrp_WaitToBeginFrame(XFrame->FrameNumber);
 auto duration = FDateTime::UtcNow() - beginTime;
 UE_LOG(LogTemp, Log, TEXT("ovrp_WaitToBeginFrame takes %.2f sec"), (float)duration.GetTotalSeconds());

And as you can see from the log, there's a call that takes 30s to finish.

link text

log.txt (1.8 kB)
more ▼

answered Jan 10 '18 at 10:23 AM

avatar image

haowang1013
31 6 6

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

I know this is marked as resolved, but I've been having this problem and it wasn't fixed by disabling the Oculus Splash. In the end, I added a 'Set Tracking Origin' node on Begin Play

alt text

more ▼

answered Mar 22 '18 at 03:35 PM

avatar image

maffew
26 2 5

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

I know this is marked as resolved, but I've been having this problem and it wasn't fixed by disabling the Oculus Splash. In the end, I added a 'Set Tracking Origin' node on Begin Play

Set Tracking Origin

screenshot-3.jpg (12.3 kB)
more ▼

answered Mar 22 '18 at 03:36 PM

avatar image

maffew
26 2 5

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

This issue is causing a lot of grief. I am wondering if anyone could give some advice.Maffew, where did you put the "set Tracking Origin" node for it to help? I have this in the EventBeginPlay of the pawn, but have tried in the level blueprint and gameInstance.

It seems i am having this issue while trying to use stereo layers with Oculus. There is no problem on the vive. it works fine the first time in a PIE session. but trying again, or trying in a packaged build has a 30~ second delay, with the pawn's VRcamera often at floor level.

How did you disable the splash screen code?

more ▼

answered Jun 04 '18 at 05:58 PM

avatar image

michaelwbell
16 1 3

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

I believe this is related to the problem here:

https://answers.unrealengine.com/questions/575218/permenant-black-screen-after-trying-to-use-loading.html

Solved my problem which sounds pretty much the same

more ▼

answered Jul 02 '18 at 04:30 PM

avatar image

Badtz52
21 1 5

(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