Google Cardboard on iOS support

When will Unreal Engine get official support on Google Cardboard for iOS?

Unity has it’s own Cardboard SDK featuring support for both Android and iOS.
It looks possible to get UE onto Android via the Cardboard Android SDK, but there’s nothing currently for iOS.

Google Cardboard has shipped 1-million units and now supports iOS. It is currently the most widely available VR platform. It would be great to use UE to reach that audience.

How does this not have more upvotes and a response? I’m floored that Unity supports this but Unreal doesn’t…

Don’t actually know what you whant from cardboard API, but if you want just two cameras then enable SimpleHMD plugin in Editor (+add private dependency to Proj.Build.cs). For manual camera control disable auto HMD following with:
PC->PlayerCameraManager->bFollowHmdOrientation = true;
or in BP “Follow Hmd Orientation”=true

P.S. It doesn’t support iOS right now 4.9. But I believe you just need build it (plugin it self) for iOS once or ask Epic how to do it.

I open Unity, follow 5 minutes of simple instructions, and have a working Cardboard camera that I can animate, parent to the player, etc.

That’s what I expect out of Unreal. They do everything else extremely well but for some reason fall totally flat on supporting Cardboard in any way shape or form. It’s the largest VR platform and the easiest to use :\

Regardless thanks for the tips on the HMD stuff, I’ll try to figure it out and post back here if I make any headway.

I am using google cardboard right now with UE and I am ready to help

Agreed that with Unity, Cardboard is very straightforward to set-up. They even have line-of-sight and click interaction built into the sample.
The documentation is clear and simple:
https://developers.google.com/cardboard/unity/get-started-ios

It’d be great if there was an equivalent for UE4.

How are you handling the device gyroscope to HMD rotation?

Here like we can get and handle data from device sensors

// in BeginPlay() get APlayerController* PC;
PC = GetWorld()->GetFirstPlayerController();

// in Tick() method
auto input = PC->PlayerInput;

FRotator player_rotation(PC->GetControlRotation());

FVector gravity(input->GetVectorKeyValue(EKeys::Gravity));// gravity vector
FVector rotrate(input->GetVectorKeyValue(EKeys::RotationRate));// angular acceleration
FVector acceleration(input->GetVectorKeyValue(EKeys::Acceleration));// linear acceleration

gravity.Normalize();
FRotator grot(gravity.Rotation());// gravity vector rotation

// very rough but good start
player_rotation.Pitch = -grot.Pitch;
player_rotation.Roll = grot.Yaw;

player_rotation.Yaw += -rotrate.Y * gain; // gain may be 2.0

PC->SetControlRotation(player_rotation);

grot.Pitch and grot.Yaw are pretty enough, but considering inertia when moving fast that need smoothing algorithms like final = last*(1-k) + new*k where k is 0...1.

I am currently trying to use more complex Kalman’s filter, but not tested yet

Thanks for sharing! My development experience in Unreal is pretty limited but I’ll give this ago, way better than starting from nothing :slight_smile:

I posted a general blueprint for android and ios, that uses the sensors in an ensemble to recreate the VR perspective and orientation tracking.

Morskoy, I’m new to Unreal as well and just sat down today to solve the same problem. I’m still setting up the Unreal-to-iOS pipeline, so SimpleHMD support and Cardboard rendering is step 2. If I run into roadblocks, thank you for posting!

Also feel free to PM me… although being new to Unreal, I’m not even sure if the answerhub even has a private message function! :slight_smile:

I’ll try my best. PM not allowed here, and any info maybe useful to others.
For now I hacking my own version of SimpleHMD, because original has fixed aspect ratio which is wrong for my device. I think we can discuss it at forum branch

How did this go? Wondering about playing with Cardboard, but would be on iOS and would only want specific levels to render using it.

Possible?