I need to read these forums more often to keep up with everything. Its like I live under a rock while I am programming. Since the VR plugin is no longer available, several people may find my project interesting.
The game creators has released the source code on GitHub allowing us to offer updates to AGK. I have been working to integrate OpenXR (
https://www.khronos.org/openxr/) with AppGameKit (Android) for a few months now.
I do have a working Tier 2 template in Android that runs really well on the Meta Quest 2. Its not perfect though, I am getting double vision on the Meta Quest 3. Here is a link to my AppGameKit GitHub fork:
https://github.com/CounterParry/AGKRepo
In order to get this working, I had to add one command to the AppGameKit that would allow OpenXR access to the memory location of the base renderer. I am using OpenGL because I am not familiar with Vulkan. I will eventually offer this command to The Game Creators in hope that they will
add it to their source. If this command could be added, I should be able to create a VR extension that will work with AppGameKit Studio Tier 1.
Before I try to push any updates to The Game Creators, everything must work. So I need to find out what is causing the double vision on the Meta Quest 3. I am sure it had to do with "m_FOVAdjustment". The camera bound values OpenXR creates for AppGameKit don't work correctly
without multiplying them by "m_FOVAdjustment". I thinking that "m_FOVAdjustment" has to be a different value on the Meta Quest 3. Of course "m_FOVAdjustment" shouldn't need to be used at all.
agk::SetCameraOffCenter(1, 1); // AGK already has built in commands to allow VR display?
float m_FOVAdjustment = 0.07f; // Why is this needed for AGK? And would this change if used on a different headset?
XrResult result = xrLocateViews(m_session, &viewLocateInfo, &viewState, static_cast<uint32_t>(views.size()), &viewCount, views.data()); // OpenXR command
agk::SetCameraBounds(1,
views[i].fov.angleLeft * m_FOVAdjustment,
views[i].fov.angleRight * m_FOVAdjustment,
views[i].fov.angleUp * m_FOVAdjustment,
views[i].fov.angleDown * m_FOVAdjustment);
agk::SetCameraFOV(1, m_FieldOfViewHor); // Is this command needed with SetCameraBounds?
agk::SetCameraRange(1, nearZ, farZ);
agk::SetScissor((float)scissor.offset.x, (float)scissor.offset.y, (float)scissor.extent.width, (float)scissor.extent.height);
Android is difficult to work with. Building and pushing to the VR headset with Android Studio is slow and clumsy. I think my next step to
create a PCVR version and get it working there.