Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
imjusthere's avatar
imjusthere
Explorer
7 years ago

Teleportation blasts me out into space... sometimes.

I'm using unity 2018.3.7f1 with oculus integration 1.35 and oculus (desktop) 1.29.1. In any of the demo scenes when I teleport about half the time it will shoot my playercontroller out into space. The other half it works fine. It acts as though it's colliding with something and applying a huge horizontal force causing the playercontroller to slide right off the ground plane. You can't teleport off the ground plane so that's not what's happening. I added some walls to keep me from flying out into space but for the life of me I can't figure out what's going on.

4 Replies

Replies have been turned off for this discussion
  • I'm getting the same issue on Unity 2018.3.0f2, 2018.3.8f1, 2018.3.7f1, and 2019.2.0a6. Unity 2018.2.0f2 works though.
  • For now I am commenting out the following line in LocomotionTeleport.cs in the function DoTeleport(). This makes the glitch go away. I'm not sure yet if this is going to cause me any other problems but it gets me working for now.

    788| LocomotionController.PlayerController.Teleported = true;
  • Anonymous's avatar
    Anonymous
    Super helpful, thank you,  was having the same issue on Quest. Have you found any side effects yet?
  • mouse_bear's avatar
    mouse_bear
    Retired Support
    You may want to increase the "Fixed Timestep" value (within the Unity editor, under the Edit -> Project Settings -> Time menu) to match the max framerate of your device. This value determines the rate at which your physics objects update; this is set to 0.2 as default within Unity (50Hz). You can refer to the following chart to determine which values to enter based on device:

    50Hz (Default) = 0.2
    60Hz (Gear VR) = 0.0167
    72Hz (Quest/Oculus Go) = 0.0138
    80Hz (Rift S) = 0.125
    90Hz (Rift) = 0.0111

    This not only makes the physics within your experience smoother, but it also solves the issues around teleporting.