I’m designing a custom loading screen for a game I’m working on, and would like to know how custom loading screens are handled in with VR headsets.
I’ve experienced that the default loading screen for VR is different than anywhere else - you see the skybox, and is presented with a white and blue-themed tiny loading screen where I need to stretch my neck to the point where I could have my head roll off, so high up it is.
My guess on how to implement a loading screen for VR is to have an invisible sphere for the background with some repetive image, and show a 2D GUI facing the camera using a SurfaceGui
Since it contains the following code, I’m fairly sure you can remove the default loading screen:
if ReplicatedFirst:IsDefaultLoadingGuiRemoved() then
OnDefaultLoadingGuiRemoved()
else
ReplicatedFirst.RemoveDefaultLoadingGuiSignal:connect(OnDefaultLoadingGuiRemoved)
end
So - I just tried out the loading screen I had made in VR.
Using Camera.CFrame, the contents of the loading screen appeared a few studs behind me, while using UserInputService:GetUserCFrame(Head) made the contents of the loading screen appear in the baseplate in front of me.
So just how exactly are we given the coordinate of the viewer’s head? If I want to encapsulate them in a sphere.
edit: with forced 1st person view, offsetting the bricks some studs and rotating 90 degrees(?) made the trick.