Facepunch / sbox-issues

173 stars 11 forks source link

List of issues with VR #5803

Open ShadowBrian opened 1 month ago

ShadowBrian commented 1 month ago

Describe the bug

To Reproduce

Check any of the above using the built in API. The skybox issue you can verify by loading up Dockyard in VR, though it might also be present on Flatgrass.

Expected behavior

It should probably work close to the same as it did before OpenXR was implemented, the controller zero pose is a tricky one because SteamVR had a custom zero point for each controller, so I would be okay if that was permanently changed to something sane, it just currently isn't sane.

Media/Files

No response

Additional context

No response

xezno commented 1 month ago

I've fixed everything that I've checked off, some notes:

ButtonA/B.WasPressed are always true while held, should only be one frame.

This is working as intended, but might be a little confusing (considering the other input types all have delta properties), so I've added DigitalInput.Delta if you wanna check whether the state has changed for some reason.

Trigger delta is always zero. (Might be all deltas?)

I can't reproduce this, they're all working for me. What function are you checking in, how are you checking, etc?

Finger tracking does not work on Index using curl values, can't vouch for Oculus devices though.

This one is working for me on Oculus over SteamVR. Do you have something in your SteamVR settings that might prevent this? Could you post your s&box log file?

ShadowBrian commented 1 month ago

Controller velocity seems to return infinite,infinite,infinite when I try printing it...

The controller zero pose is MUCH better now thanks!

I'm not entirely sure of the point of WasPressed vs IsPressed, IsPressed is the current value, WasPressed is the value it was last frame? I guess? So you'd only ever really need that to calculate if it was pressed last frame or not, which you can now do with the delta, so something seems obsolete here...

Trigger delta does seem to be working now- perhaps it was something to do with input not being registered since the button/trigger inputs only work while you have the headset on, might have been on my forehead while I was trying to see if it worked which does not always count as on your head...

If I debug log Input.VR.LeftHand.GetFingerCurl(0) on index it prints -∞ which I've honestly never seen before today, there are no settings in SteamVR for this since it's all OpenXR controlled as far as I understand.

Here's a log file with just printing that finger on both controllers, seems like left and right both return different values? But they're non-changing.

Log.log

ShadowBrian commented 1 month ago

Just tested TriggerHaptics, seems to spam my console with

duration (Parameter 'Duration needs to be between 0.0 and 10.0 seconds')
System.ArgumentOutOfRangeException: duration (Parameter 'Duration needs to be between 0.0 and 10.0 seconds')
   at Sandbox.VR.VRController.Rumble(Single duration, Single frequency, Single amplitude)
   at Sandbox.HapticEffect.Update(VRController vrController)
   at Sandbox.VR.VRController.UpdateHaptics()
   at Sandbox.VR.VRController.Update()
   at Sandbox.VR.VRInput.Update()
   at Sandbox.VR.VRSystem.Update()
   at Sandbox.EngineLoop.FrameStart()
   at Sandbox.EngineLoop.RunFrame(CMaterialSystem2AppSystemDict appDict, Boolean& wantsQuit)

Every frame while the game hangs (not the editor for some reason) This persists outside of play mode too

ShadowBrian commented 1 month ago

Grip bindings on index are assigned to squeeze, should probably be just the finger tracking based grip value because squeezing is fairly hard to maintain vs just holding the controller