Reputation: 29
I am currently playing around with Unity. I have a simple question that I can not find and answer for.
I can easily set up an AR session in Unity for iOS and Android using the AR foundation toolkit. But I would like to make the phone camera picture to render in steroscopic like in regular VR thus creating a Mixed Reality project.
I don't want to use the SDK related to Microsoft Hololens since I would like to aim the development for iOS and Android devices.
Thanks in advance!
Upvotes: 0
Views: 627
Reputation: 2340
Premade solution
Microsoft has a package that aims for mixed reality but it's for Android and iOS: https://github.com/Microsoft/MixedRealityToolkit-Unity - but this package is huge, and if you have a project already it will be hard to convert to use this package.
Custom solution
If you want to create something together for the prototype (although I would not recommend this for production code as it's not optimized) you can use 2 cameras and set them as following
Create 2 cameras, with slightly offset origin. And use the ViewportRect parameter of the camera to set rendering for two different eyes.
One camera should have (x: 0, y:0, w: 0.5, h: 1) second (x: 0.5, y:0, w: 0.5, h: 1)
Upvotes: 0