AlGolden Posted February 21, 2021 Author Share Posted February 21, 2021 @chengnaythanks. We'll wait for your fix for some time since we afraid some new bugs can appear if we add Oculus Integartion. At list it would be necessaryto test all the project thourously after such a modification. Link to comment Share on other sites More sharing options...
chengnay Posted February 22, 2021 Share Posted February 22, 2021 @AlGolden After further investigation, we found out that Oculus XR Plugin will report isPoseValid=false which leads to release game object. In below screenshot, if pose is invalid, ColliderEventCaster will be SetActive false. But for the case using Vive Focus Plus, the controller is using ultrasonic + IMU fusion tracking. I believe the isPoseValid should be true when controller is connected. There are several workarounds if you want to align the behavior. Or you can import Oculus Integration Unity SDK. Link to comment Share on other sites More sharing options...
AlGolden Posted February 23, 2021 Author Share Posted February 23, 2021 @chengnay Thank you. What workaround do you recommend? Link to comment Share on other sites More sharing options...
chengnay Posted February 24, 2021 Share Posted February 24, 2021 @AlGolden It depends on what is your expectations. Do you want your controller to rotate during lost tracking? METHOD1 Your controllers can still rotate at fixed position after lost tracking. In Assets\HTC.UnityPlugin\VRModule\Modules\UnityXRModuleBase.cs, line 200, currState.isPoseValid = true || GetDeviceFeatureValueOrDefault(device, CommonUsages.isTracked); METHOD2 Your controllers will be freeze after lost tracking. 1. Enable the ColliderEventCaster game object (yellow box) 2. Empty the "On Is Valid Changed" under PoseTracker (red box) Let me know if this does not fixed your issue, thanks! Link to comment Share on other sites More sharing options...
lawwong Posted February 24, 2021 Share Posted February 24, 2021 Hi @AlGolden The unexpected behavior for you is caused by this: In our default setup in our prefab & example scene, RenderModelHook (visible controller model) will be switched off only if device is disconnected. ColliderEventCaster (invisible controller grabber) will be switched off if device is disconnected or lost tracking. So when your Rift controller or Vive controller lost tracking (but still connected), their model are still visible but the grabber is disabled (thus grabbed object is released). But for Focus Plus controller, its hard to lost its tracking, so the grabber isn't disabled. Assuming you want to align them, Option 1) Make RenderModelHook also switched off when device is disconnected or lost tracking by simply adding switch function to PoseTracker.OnIsValidChanged callback Option 2) Make CooliderEventCaster switched off only if device is disconnected To achieve that, you have to write a script that detect if device is connected (see attached file) DetectDeviceConnection.cs Hope it helps. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now