Jump to content

Wrong behaviour on Oculus


Recommended Posts

@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

@AlGolden It depends on what is your expectations.

Do you want your controller to rotate during lost tracking?


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);


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

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)




Hope it helps.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...