# VR mode, custom pawn, view is 180... in rift mode only

**URL:** <https://forums.unrealengine.com/t/vr-mode-custom-pawn-view-is-180-in-rift-mode-only/1384>\
**Category:** XR Development\
**Tags:** unreal-engine\
**Created:** [March 30, 2014, 3:08am UTC](https://forums.unrealengine.com/t/vr-mode-custom-pawn-view-is-180-in-rift-mode-only/1384 "2014-03-30T03:08:51Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![olivierJT](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/olivierjt/32/1194659_2.png) [@olivierJT](https://forums.unrealengine.com/u/olivierJT)\
**Post date:** [March 30, 2014, 3:08am UTC](https://forums.unrealengine.com/t/vr-mode-custom-pawn-view-is-180-in-rift-mode-only/1384/1 "2014-03-30T03:08:51Z")

</div>

[SOLVED, kinda…]  
Hello everyone,  
So i have been tinkering with a custom pawn and all.

I put the camera on a socket on the skeleton.  
Problem : play in viewport or non rift mode : all is fine  
Rift mode : my head is facing +x world axis.

I tried fixing it by rotating the socket, and the camera, but nope. I can’t get “non rift” and “rifted” to play the same. Strange !

Anyone got that issue also ? (and fixed it) 🙂

Merci.

Edit :  
**So the issue happens in ALL the unreal content demo, nobody noticed…**  
The fix is to create your own Player Controller and enable “use HMD rotation”  
But by default when opening all the demo, nothing works properly.  
It’s a minor issue but still is.

Thank you Kris !  
So guys you have to follow these steps in ALL content :

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...

\*\*Blueprints

```
Create a Blueprint that based on PlayerCameraManager.
In the Defaults tab, find "Follow Hmd Orientation" and set it to "true".
Create a Blueprint that based on PlayerController.
In the Defaults tab, find Player Camera Manager Class and set it to your PlayerCameraManager Blueprint.
Create a Blueprint that based on GameMode.
In the Defaults tab, find Default Controller Class and set it to your PlayerController Blueprint.
Finally, under your levels World Settings, find GameMode Override and set it to your GameMode Blueprint.

```

\*\*  
That will make it work.

---

<div class="post-metadata">

**Author:** ![Kris](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kris/32/758129_2.png) [@Kris](https://forums.unrealengine.com/u/Kris)\
**Post date:** [March 30, 2014, 5:19am UTC](https://forums.unrealengine.com/t/vr-mode-custom-pawn-view-is-180-in-rift-mode-only/1384/2 "2014-03-30T05:19:42Z")

</div>

Depends on what you’ve been doing in C++ or with Blueprints.

How are you handling the input from the Rift?  
Through your player camera manager?  
Custom player controller?  
By manually getting the orientation??

Show us the code or Blueprint - something.  
Until I have some idea of what you’re doing under the hood, I can only take random’ish guesses 🙂

---

<div class="post-metadata">

**Author:** ![olivierJT](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/olivierjt/32/1194659_2.png) [@olivierJT](https://forums.unrealengine.com/u/olivierJT)\
**Post date:** [March 30, 2014, 10:18am UTC](https://forums.unrealengine.com/t/vr-mode-custom-pawn-view-is-180-in-rift-mode-only/1384/3 "2014-03-30T10:18:37Z")

</div>

Bonjour Kris !

Well, I am not a coder at all, I spent last 2 years learning “unreal script”, I am not ready to learn C++ 🙂 I will blueprint all my project.  
I am not handling anything, I never mention or put anything in my blue print regarding HMD, or rift.  
My camera is added in a blue print in a hierarchy where I add my skeletal mesh and camera (it’s a pawn blueprint I guess, pretty standard)  
On my imported skeleton, I added a socket to the neck joint, oriented it, and attached the camera to it in the Pawn blueprint.  
Custom game in the world properties, and that’s it.  
Animation is just one in auto start (it’s a kind of cinematic)  
I copied from DefaultEngine.ini the Ouculus neck code too (to my Engine.ini in my project) Si I can adjust it.

Nothing else.  
I will post some screens later !

---

<div class="post-metadata">

**Author:** ![olivierJT](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/olivierjt/32/1194659_2.png) [@olivierJT](https://forums.unrealengine.com/u/olivierJT)\
**Post date:** [March 30, 2014, 3:59pm UTC](https://forums.unrealengine.com/t/vr-mode-custom-pawn-view-is-180-in-rift-mode-only/1384/4 "2014-03-30T15:59:20Z")

</div>

Hello Kris,

So here what I have, as you can see nothing special, I tried to change the PC controller, the orientation of the socket, of the camera, of the skeleton, I always end up it VR mode @ 180Degres.  
I don’t understand at all.  
I’ll be trying stuff today, if I found the cause/solution i will post back here of course !  
FYI it’s a strange set up and skeleton, I know, it’s because it for a non playable demo.

It did work very sell with the same asset and nothing special on UDK, this is adding to my “I don’t get it” 🙂  
\*  
Edit : deleted my pawn set up images, as they are not the issue\*

---

<div class="post-metadata">

**Author:** ![Kris](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kris/32/758129_2.png) [@Kris](https://forums.unrealengine.com/u/Kris)\
**Post date:** [March 30, 2014, 7:10pm UTC](https://forums.unrealengine.com/t/vr-mode-custom-pawn-view-is-180-in-rift-mode-only/1384/5 "2014-03-30T19:10:52Z")

</div>

Odd.  
Default camea behaviour simply adds the HMD orientation to the player controllers rotation.  
That is it.  
If your Rift is stationary and facing directly forward, it should simply follow the mouse input / player controller rotation.

There is something going on here that I cannot see.

Guess I’ll start with the obvious - does the Rift work in non-UE4 environments correctly, such as one of the OVR demos?

---

<div class="post-metadata">

**Author:** ![olivierJT](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/olivierjt/32/1194659_2.png) [@olivierJT](https://forums.unrealengine.com/u/olivierJT)\
**Post date:** [March 30, 2014, 7:49pm UTC](https://forums.unrealengine.com/t/vr-mode-custom-pawn-view-is-180-in-rift-mode-only/1384/6 "2014-03-30T19:49:37Z")

</div>

Thank you for your support ^_^  
Yes my rift works woth everything UDK UE4 demos and all no problem at all.  
At worse i will reverse the camera, but I still want to know what’s going on ^_^

Don’t bother too much with my issue, I’ll try to debug it and report back here !  
Merci !

---

<div class="post-metadata">

**Author:** ![olivierJT](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/olivierjt/32/1194659_2.png) [@olivierJT](https://forums.unrealengine.com/u/olivierJT)\
**Post date:** [April 3, 2014, 11:20pm UTC](https://forums.unrealengine.com/t/vr-mode-custom-pawn-view-is-180-in-rift-mode-only/1384/7 "2014-04-03T23:20:32Z")

</div>

I don’t get it. :((  
I gotten rid of my pawn, changed controller classes, rotating sockets and camera…  
Nothings works…  
+X in VR mode…

**Ok I went back… and… it like that in fact in all the content I use in UE4 !!**  
All the other project. Only UE4 !  
I have to find why.  
I’ll start with the ini files or something…

---

<div class="post-metadata">

**Author:** ![Kris](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kris/32/758129_2.png) [@Kris](https://forums.unrealengine.com/u/Kris)\
**Post date:** [April 4, 2014, 1:14am UTC](https://forums.unrealengine.com/t/vr-mode-custom-pawn-view-is-180-in-rift-mode-only/1384/8 "2014-04-04T01:14:37Z")

</div>

Happens even with project based on the first person C++ template?

---

<div class="post-metadata">

**Author:** ![olivierJT](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/olivierjt/32/1194659_2.png) [@olivierJT](https://forums.unrealengine.com/u/olivierJT)\
**Post date:** [April 4, 2014, 10:36am UTC](https://forums.unrealengine.com/t/vr-mode-custom-pawn-view-is-180-in-rift-mode-only/1384/9 "2014-04-04T10:36:55Z")

</div>

Bonjour Kris 🙂  
I Just woke up.  
So yeah it happens everywhere but not all is the same… :  
First persone game : 180  
Content example VR map : 90 to the right  
Landscape : ok !  
Physic animation 90 to the right  
Destructible 90 to the right  
reflection (Content expl) 90 to the right…  
etc…

You know the strange part… :  
My rift is facing my screen.  
Ok \*\*\*\*\*\* some back to confirm :  
**When I go to rift mode my rift is ALWAY facing +X world axis !**

and yeah it’s the same in my own project, at least I am happy, it’s not my project the reason ! 🙂

So it’s not related to the map, or the orientation of the start player or the pawn.  
If I stat a level and walk, or turn or do nothing : VR mode \>\>\> face to +X !

Deleted my config folder from UE4 install.  
Made my project config file like new too.  
Still the same issue…  
I may have to reinstall everything…

I guess I will have to work on a camera controller BluePrint or something to compensate but,  
am I really the only one to have this issue ???

---

<div class="post-metadata">

**Author:** ![olivierJT](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/olivierjt/32/1194659_2.png) [@olivierJT](https://forums.unrealengine.com/u/olivierJT)\
**Post date:** [April 5, 2014, 10:10pm UTC](https://forums.unrealengine.com/t/vr-mode-custom-pawn-view-is-180-in-rift-mode-only/1384/10 "2014-04-05T22:10:20Z")

</div>

Still the same thing after a fresh reinstall of everything  
…

Edit : fixed in way…

---

<div class="post-metadata">

**Author:** ![Thyme](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Thyme](https://forums.unrealengine.com/u/Thyme)\
**Post date:** [April 11, 2014, 2:39pm UTC](https://forums.unrealengine.com/t/vr-mode-custom-pawn-view-is-180-in-rift-mode-only/1384/11 "2014-04-11T14:39:14Z")

</div>

The 180 degree rotation issue sounds like the HMD orientation is being applied twice. In DefaultEngine.ini, under [Oculus.Settings], try setting bUpdateOnRT to false.

---

<div class="post-metadata">

**Author:** ![olivierJT](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/olivierjt/32/1194659_2.png) [@olivierJT](https://forums.unrealengine.com/u/olivierJT)\
**Post date:** [April 11, 2014, 3:31pm UTC](https://forums.unrealengine.com/t/vr-mode-custom-pawn-view-is-180-in-rift-mode-only/1384/12 "2014-04-11T15:31:48Z")

</div>

@ Thyme  
The issue has not been fixed, but there is some coding or blueprint to create/make for the content to work properly.  
I edited and added to my first post.  
Thanks for posting Thyme.
