Disable ARKit Camera

Hello,

Currently working in a project using the ARKit (which is working great). Is it possible within the same project to have both an AR Camera and a normal Camera?

I want to include an option for the user to turn off AR and be able to play from a normal Camera. Is there a way to accomplish this? In 4.17 there was an ARkit camera component, however in 4.18 is seems like if you have the ARKit plugin Loaded and “start in AR” checked in project settings, any camera will become an ARKit camera. I can not find a way to specify if I want a specific camera to be an AR Camera or not.

One thing that helps strangely is under my Pawn’s Camera settings, un-checking “Lock to HMD” seems to help a bit, however if I move the iOS device I still seem to inherit its movement into the camera.

I have also tried quite a few console commands to disable anything possibly related to the AR Camera with no luck.

Perhaps there is a way to uncheck “start in AR” during runtime? Or Disable the plugin in certain game modes?

There are functions “Start AR Session”, “Stop AR Session” and “Pause AR Session”.

“Start AR Session” takes an AR Session Config as input. You find it in your content browser.
Notice that for Session Type, there are (among others) the options “None” and “Orientation only” (does not use the camera, only motion sensors).

To switch session configs, there is no need to stop a running session, just execute “Start AR Session” again with another Session Config.

Tip:
It is recommended to pause the AR Session and maybe even set the frame rate to a humble 30FPS when not needed. This will give users more battery life and can potentially avoid early cpu throttling because of high temperatures.