0

Trackers world position in Unity are wrong

Hello, 

I am using MiddleVR Pro to config a CAVE setup for a Unity3D VR application.
The config uses Razer Hydra wands as controllers for the application.

I encountered a problem with my raycasts in the app : the trivials interaction do not work anymore, e.g. selecting an object by pointing the wand towards it, used to lighten the wand model in green.

After some debugging, I noticed that the origin of my rays were erroneous : they didn't update and stayed local to the user spawn zone.

The way I retrieve the position is simple : this.gameObject.transform.position, gameObject being the wand model Game Object.

In the HMD config of the application, the same instruction retrieves the right world positions, wherever the user is in the application's map, thus making the app works correctly.

In our last minute test, we noticed that putting all of our processing in the Late Update phase instead of the Update phase made the world position works correctly. However, we would like to find a proper and clean solution to this issue to avoid side effects.

0 comments

Please sign in to leave a comment.