Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Oculus Teleport not working

Discussion in 'Unity Reflect' started by PWGFnet, Feb 25, 2021.

  1. PWGFnet


    Dec 30, 2020
    Did teleport stop working for the oculus rift with the latest reflect viewer code?
    I pulled the latest code from git (
    Using Unity 2019.4.14f1, Unity Reflect 2.0.1-preview.13

    The teleport beam displays, but when I use the right trigger to go to the highlighted location I get an error.

    This error is displaying in the console when I try to teleport.
    ArgumentException: Destination array was not long enough. Check destIndex and length, and the array's lower bounds
    System.Array.Copy (System.Array sourceArray, System.Int32 sourceIndex, System.Array destinationArray, System.Int32 destinationIndex, System.Int32 length) (at <9577ac7a62ef43179789031239ba8798>:0)
    System.Array.Copy (System.Array sourceArray, System.Array destinationArray, System.Int32 length) (at <9577ac7a62ef43179789031239ba8798>:0)
    UnityEngine.XR.Interaction.Toolkit.XRInteractorLineVisual.UpdateLineVisual () (at Library/PackageCache/com.unity.xr.interaction.toolkit@1.0.0-pre.2/Runtime/Interaction/Interactors/Helpers/XRInteractorLineVisual.cs:504)
    UnityEngine.XR.Interaction.Toolkit.XRInteractorLineVisual.OnBeforeRenderLineVisual () (at Library/PackageCache/com.unity.xr.interaction.toolkit@1.0.0-pre.2/Runtime/Interaction/Interactors/Helpers/XRInteractorLineVisual.cs:308)
    UnityEngine.BeforeRenderHelper.Invoke () (at <9674024ab0e74d27bbe9eaa30dab34d1>:0)
    UnityEngine.Application.InvokeOnBeforeRender () (at <9674024ab0e74d27bbe9eaa30dab34d1>:0)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
  2. julesd16


    Unity Technologies

    Oct 7, 2020
    There is a condition that block the teleport from triggering in the XRPackage. Specifically in the script BaseTeleportationInteractable.cs line 234. This is fix in the latest version of the XR package so the easiest solution would be to change the teleport trigger in the VRmode Scene to On Select Entered. Then the teleport should work again.