Enabling SimpleHMD plugin locks player controller pitch

It’s all the title. We’re using mouse control and blueprints to link InputAxis to AddControllerYaw/PitchInput, and when SimpleHMD is enabled, the pitch becomes locked (yaw continues to work). This is without an HMD plugged in.

Our workaround is to disable the plugin for HMD’les development, but a fix would be appreciated.

We can disable auto-HMD orientation

PC->PlayerCameraManager->bFollowHmdOrientation = true; // WHUT? =) But it works

I found that ApplyHmdRotation() in SimpleHMD.cpp truncating Pitch/Roll rotation.

Searching where it’s calling found PlayerController.cpp

Won’t that disable hmd orientation tracking altogether when we are actually testing on device?

If you look into the SimpleHMD plugin folder, in SimpleHMD.cpp, FSimpleHMD::ApplyHmdRotation, you’ll notice the following line:

DeltaControlRotation.Pitch = 0;

To override this behavior, create a copy of the SimpleHMD plugin local to your project in which you comment out this line. Instructions on how to override a built in plugin are available in this tutorial:

https://wiki.unrealengine.com/Override_Built_In_Plugin

Remember that manually setting the view pitch while running on device can cause discomfort to the player. That is why the lock is there by default.

It will, but SimpleHMD doesn’t provide properly orientation tracking anyway

bwiklund, did you try out the tutorial?

Hi pgomes,

First of all, sorry for my English (I’m from Spain and English is not my first language).
I tried that solution (comment out the line: DeltaControlRotation.Pitch = 0;) but nothing seems to happen in my project (UE 4.10.2)
Pitch is still locked and i would like to use the mouse for this.

I followed the tutorial to override built in Plugin.

Please, any help?

Regards!

Hi pgomes,

First of all, sorry for my English (I’m from Spain and English is not my first language).
I tried that solution (comment out the line: DeltaControlRotation.Pitch = 0;) but nothing seems to happen in my project (UE 4.10.2)
Pitch is still locked and i would like to use the mouse for this.

I followed the tutorial to override built in Plugin.

Please, any help?

Regards!

You replaced the line directly on the Unity Engine source, or on a local plugin?

Any solution for the pitch block?

I tried the override but could not get it to work.

Please add a comment and up vote question instead of an “answer” last time. I’ll ask the same question:
Did you replaced the line directly on the Unity Engine source, or on a local plugin?

Local plugin, following the guide on the link.

Was the modified plugin definitely being used? Did you double check by adding a breakpoint or log message confirming that it was hitting that code?

No, I did not see anything on the log.

I will try to do it again to maybe I missed something.

You need to add the log yourself. You can remove it later once you confirm it’s showing up. Try to log a message right next to the pitch changed line and make sure it gets printed.

I can now get the modified SimpleHMD to load, but does not release the pitch lock.

So it is logging whatever message you printed?

Yes, but I cannot get it to give me the pitch control