rfsheffer / QuestHands

An Unreal Engine 4 plugin for the new Oculus Quest hands tracking. To tie us over till Oculus's official release.
MIT License
112 stars 22 forks source link

Returning from system dashboard causes laggy hands tracking #1

Open rfsheffer opened 4 years ago

rfsheffer commented 4 years ago

When entering the system dashboard via the system gesture and returning to the application the hands tracking is very laggy. Just the hands, not the game.

Steps to reproduce:

It is hard to tell what is happening here. It seems the SDK is just returning very delayed hand tracking data which might be a bug in the closed source dll for the version 12 SDK for unreal.

rfsheffer commented 4 years ago

It has been reported that hiding the hands from view for a bit then bringing them back into view can fix the issue. It is possible the tracking is getting reset internally (The Oculus SDK) and whatever is causing the update frequency to be reduced is being reset as well.

Jumbli commented 4 years ago

Hiding my hands didn't always fix it for me although it sometimes worked. However, If you execute console commands "vr.bEnableHMD 0" then immediately "vr.bEnableHMD 1" it resets and everything is fine again. In my Blueprints I detect if the hand positions haven't changed in a few frames and then do the reset when required. You get a flicker, but at least it's an easy work around.

Thanks for the plugin. I've used it in my Jigsaw 360 project on SideQuest and added a link to your project in the credits.

rfsheffer commented 4 years ago

Thanks for the tip about vr.bEnableHMD, that is very interesting and I bet I could achieve a similar effect in the code. I will take a look, cheers!

AlePax commented 4 years ago

Hi there! Any news about a fix for this issue?

Alexotronic commented 4 years ago

@AlePax Are you using Oculus Branch or Official UE 4.25?

I'm currently using 4.24.3 from Oculus Branch (Compiled around the time of oculus SDK v15) And I'm also seeing this issue.

I haven't tried @Jumbli s workaround yet, but I think trying to implement that will be a better approach than trying to switch engine versions!

2 months until shipping for me - so if I get this solved via Jumblis fix I'll post some specific Blueprints.

Huge thank you to Ryan Sheffer , this plugin enabled me to make hand-tracking a possibility for current project. (Started it in April)

AlePax commented 4 years ago

@Alexotronic project started on 4.24 Oculus branch and switched to 4.25 Oculus branch as soon as it became available because of official support. Same situation here: project started 3 months ago and I suspect I'll try the workaround as well, but feel free to post your BP fix! You'll be faster than me for sure! ;)

Alexotronic commented 4 years ago

@AlePax @Jumbli

This is what I came up with https://blueprintue.com/blueprint/bu992ypg/

It works perfectly for when pausing/resuming by pressing the button on the side of the headset

HOWEVER when it triggers from exiting/entering guardian the orientation/position of the level is changed.

Tried branching logic on (Is Guardian Displayed) and (Has System Overlay Present) functions with no luck. Please let me know if you find a solution to this!

davidaae commented 4 years ago

Thank you for sharing your solution @Alexotronic but unfortunately when ever I use vr.bEnableHMD my Quest freezes and I have to force restart it. I am using the launcher version 4.25.1 with Vulkan enabled, in what version did you get it to work?

Alexotronic commented 4 years ago

I'm still on 4.24.3 from Oculus Branch (Compiled around the time of oculus SDK v15)

davidaae commented 4 years ago

Turns out it was vulkan causing it to crash, after going to back to ES3 it works!

Alexotronic commented 4 years ago

Glad to hear it.

Strangely enough I'm using Vulkan - but if I start to get lock-ups I'll try toggling to ES3.1 (I have read about some issues with Vulkan + 4.25... )

AlePax commented 4 years ago

@Alexotronic thanks for the fix! Alas, I confirm it's buggy under 4.25 (Oculus branch) with Vulkan enabled (didn't try 3.1 yet). It works per se in my case as in the tracking works again, but the viewport gets messy and pixelated with random big black tiles all over the place.

SadKingGames commented 3 years ago

Hi, I was wondering if anyone found a solution for the "lag" happening to the quest hand tracking components after entering/exiting the guardian passthrough state on the Quest.

I am on UE4 4.25 and also using Vulkan. I tried a lot of things but had no luck finding a solution so far.

Alexotronic commented 3 years ago

@SadKingGames Have you tried implementing my solution that I posted above? (I found it to mostly work, and if you see a black screen on level transitions put your hands behind your back then infront of you again)

Also, hand tracking is now built into 4.26 - I've been getting a crash when launching on device - I'd be curious to know if you can package and successfully launch w/ 4.26 on Quest

AlePax commented 3 years ago

I confirm the only proper and working solution I found is dropping the plugin altogether and using 4.25 (Oculus Branch) and ES3.1. You can start from the Train scene sample inside the engine folder.

SadKingGames commented 3 years ago

@Alexotronic I tried your solution too with 4.25 and Vulkan this resulted in a crash on the moment it triggered the console command. Regarding 4.26 I can test it for you later today ill let you know the result!

@AlePax That would be a shame as I am quite far with my current project. I didn't notice the issue until some playtesters walked outside the guardian. Well, viewing you suggested I drop the plugin, I am assuming the mistakes are from the plugin's code then? Have you tried it without the plugin in 4.25 with Vulkan, because if that works then it has to be the plugin for sure?

I will try a couple of different build/render settings to test if that makes a difference.

AlePax commented 3 years ago

@SadKingGames never tried Vulkan again because at that time (about 6 months ago) there were bugs and issues with that even using official Oculus branch... so that project was completed with ES3.1. Gonna start a new project soon and try Vulkan from the start... fingers crossed.