Closed rahsingh-ms closed 5 years ago
Huh, this was something I noticed and thought I had fixed as part of https://github.com/microsoft/MixedRealityToolkit-Unity/pull/4707. The pointer and grip poses were being properly transformed based on the transform of the playspace, but the source pose wasn't. I'll take a look.
Actually, should have been fixed via https://github.com/microsoft/MixedRealityToolkit-Unity/pull/5250
Hi, you are right . But the problem here that for specific case of WMR controllers, in the CreateControllerModelFromPlatformSDK() function of WindowsMixedRealityController.cs file, if we get the fileStream for controller from platform, in that case, erroneously the Visualization gameobject is getting added to the scene and not under the MixedRealityPlaySpace gameobject and that is why the teleportation is not working.
Describe the bug
We are using the WindowsMixedRealityControllers for our App's VR version and when we attempt to teleport in our app, We can see camera hands at the original position.
To reproduce
Steps to reproduce the behavior:
Describe the solution:
This issue is happening because of an error in WindowsMixedRealityController.cs class. In the function private async void CreateControllerModelFromPlatformSDK(uint interactionSourceId)
when the GLTF is found from platfor, while creating the gameobject for controller visualization, we are not adding it to under MixedRealityPlayspace but it is getting added directly to root scene which is causing the issue of seeing controllers at original position after teleportation.
The fix is in the BaseController.cs file. In the function: protected virtual bool TryRenderControllerModel(Type controllerType, InputSourceType inputSourceType)
we add MixedRealityPlayspace.AddChild(controllerObject.transform);
This line should actually be moved inside TryAddControllerModelToSceneHierarchy function
so that even if we use the platform controller visualization, they will be correctly added to under MixedRealityPlaySpace game object.
Your Setup (please complete the following information)
issue on mrtk_development branch
Target Platform (please complete the following information)