TheNexusAvenger / Nexus-VR-Character-Model

Maps Roblox characters to the VR inputs of players.
MIT License
67 stars 12 forks source link

Roblox VR Cursors are not visible in experiences where NVR is present #10

Closed B00ie23 closed 2 years ago

B00ie23 commented 2 years ago

Roblox made changes to VR on the 31st of March, however this update caused experiences with NVR to leave VR users unable to see the Roblox VR Cursor when they switch to UI Selection Mode.

https://user-images.githubusercontent.com/45867359/161369481-10d75a4b-329f-4f59-972d-ebc15d14fff1.mp4

[Tested in Studio on Oculus Quest 2, although it happens anywhere with NVR, regardless of headset.]

B00ie23 commented 2 years ago

I don't know what I clicked on while writing the issue, but it seems the label added itself at the same time it was posting.

TheNexusAvenger commented 2 years ago

Nice demo showing the issue. If I were to take a wild guess why this happens, it is the SetCore operations done when the script loads. I am not at the point where I can verify this though. https://github.com/TheNexusAvenger/Nexus-VR-Character-Model/blob/b3ca05f7beba10bdefe593ff1eaae8112f423066/src/NexusVRCharacterModelClientLoader.client.lua#L43

TheNexusAvenger commented 2 years ago

I confirmed that this line is the issue. However, I don't seem to have a way of only showing the pointer when there is something interactable. Without this, the pointer is always active. For now, I am going to leave it as-is until a solution comes up.

wellsilver commented 2 years ago

I think this might be the solution, though I dont know if it works when vrlaserpointmode is off and its not a function or whatever

https://create.roblox.com/docs/reference/engine/classes/VRService image

If that doesnt work I'm sure you can use ray-tracing

TheNexusAvenger commented 2 years ago

DidPointerHit is RobloxScriptSecurity, which makes it not usable for me. https://robloxapi.github.io/ref/class/VRService.html#member-DidPointerHit

If that doesnt work I'm sure you can use ray-tracing

As far as I know, this isn't an option either. The code already exists for checking if a hand points at a surface. Knowing where this surface is the problem since that is transparently handled.

TheNexusAvenger commented 2 years ago

As far as I know, this isn't an option either. The code already exists for checking if a hand points at a surface. Knowing where this surface is the problem since that is transparently handled.

I take back what I said regarding the "transparently handled" part. While adding a toggle for enabling/disabling the cursor, I learned there is a part Workspace.Camera.VRCorePanelParts.UserGui that appears when the menu button is pressed. Instead of 2 options for the cursor, there is 3 that are offered in the new "Roblox VR Cursor" setting:

From my quick testing on the Oculus Rift S, which I used for the video, the menu works, and voice chat can (finally) be toggled! https://www.youtube.com/watch?v=4AjUzqqjsGg

The Detect mode only works with the Roblox menu though. BillboardGuis and SurfaceGuis aren't detected. Nexus VR Core is going to remain since it addresses use cases that Roblox hasn't addressed yet. Feel free to create a new GitHub Issue or Pull Request with other concerns.