WorldLocked StereoLayer rendering at wrong location (bug)

I’m trying to get stereo layer to work, but for some reason its rendering at the wrong world location, not where it should render.

I created a new actor, added an arrow and the stereo layer as a child of the arrow, so the arrow displays where it should render. Then I parented that actor to my motion controller component so that I can move it around.

The stereo layer should be exactly where the arrow is:

http://puu.sh/t5uCR/2b53b5f0d4.png

But when I play the game, it ends up at a different location (its the black circle):

http://puu.sh/t5u65/4fdf1cc4b1.png

The location where it shows up depends heavily on the world position coordinate of where the player is. The further the player moves away from the origin of the level (0/0/0) the further the stereo layer is away from where it should render.

This sounds very much like a bug in UE4, is there anyone who saw the same and maybe knows how to fix it in the code?

After thinking a bit about the origin stuff, I tried to just the world location of the stereo layer to the relative location of the motion controller, and that fixes the location bug!

So for a stereo layer, “world locked” actually does not mean locked to UE4 world location, but locked to steam world location relative to the origin, so the location relative to the center of the room. And since the motion controller is parented to the origin, it’s relative location is the location that is correct. The arrow is at a completely wrong location now of course, because the arrow interprets the world location as UE4 world location.

Would definitely be a lot nicer if there would be at least something like a tooltip explaining that this location is needed. How should anyone know that?

The rotation unfortunately does not work, though. It roughly works for some values, but depending on the values its more or less off. The rotation of the motion controller relative to the VR origin should work here too, but it doesn’t. So I still don’t know how to fix the rotation…

This is looking from the side to see that the stereo layer rotation is wrong, the green arrow shows the correct location (thats no longer the arrow the stereo layer is parented to, thats just an arrow now thats a child of the motion controller):

http://puu.sh/t5wGI/2b5626fe15.png

http://puu.sh/t5wHF/4bd2e4e0bf.png

Sorry i don’t have an answer for this, but was wondering if you use Occulus or Vive? From the image i kinda assume you use Occulus, since i could not get the Stereo Layer to render on the mirror window with Vive. Could be there are other differences between the two, possibly bugs.

I use a Vive, I gave the thread a [VIVE] prefix :slight_smile:

Ok, but how did u get the Stereo Layer to show on the screenshot?!

I just used the “Display Mirror” feature from steamvr:

http://puu.sh/t6UkE/3e2508c43d.png

Ofc, so simple, yet so effective. thanks man

Did you managed to fix the rotation problem? I have the same problem…

In case someone else is having trouble with this, as I was having and just got it working.

A note about the world locked vs tracker locked. World locked option is activated in the editor (at least 4.24 fwd) but if you link the Stereo Layer to something (like myself the dash screen run by UMG to a vehicle) the world locked doesn’t work right. There is weird laggy floating going on. You can fix this with using tracker locked. But then you need to offset the position to compensate for the location/movement. Let’s say you have stereo layer attached to a carousel - you need to sort relative transform between player pawn and the desired location. If you do this it will all be good.

I ran into this also. For anyone that comes across it. Just change the tick setting on the stereo layer to “during physics” then it follows correctly.

3 Likes

Thanks for this!