Search Unity

Falling through the terrain

Discussion in 'VR' started by KenniKure, Aug 12, 2019.

  1. KenniKure

    KenniKure

    Joined:
    Aug 7, 2019
    Posts:
    16
    Hi forum

    I have a terrain that my player keeps falling through when I hit play. In the vr goggles I can see the terrain above me when im falling down. I have set up this terrain in the exact same way as another project I am on, and I dont fall throug that one???

    upload_2019-8-12_10-35-45.png
    I have set all sorts on colliders on the landscape but I still fall through.

    upload_2019-8-12_10-36-28.png
    On the playercontroller I also have added colliders but I am falling through???
     
  2. Hexagonon

    Hexagonon

    Joined:
    Nov 1, 2018
    Posts:
    10
    Hard to say from here... some ideas to track the problem:

    • check if your Terrain really needs a Rigidbody (unusual)
    • Depending on your VR-Kit, the terrain might need extra definitions to interact with the player
    • Try to lift your player and add a simple cube underneath it to check if the problem is the terrain or the player
    • ...
     
  3. appymedia

    appymedia

    Joined:
    May 22, 2013
    Posts:
    58
    I'm not sure if its at all related but when setting up the Oculus Integration and using the locomotion example I kept falling through the floor after teleporting. I fixed it by setting the Unity time step to 1 / my HMD's refresh rate. So for me using a Rift S it was 1/80 = 0.0125
     
  4. KenniKure

    KenniKure

    Joined:
    Aug 7, 2019
    Posts:
    16
    For some reason it just started working yesterday :) No idea as to why, but I can now walk around without falling off. Thanks for the replies :)
     
  5. V-J

    V-J

    Joined:
    Apr 1, 2015
    Posts:
    24
    @KenniKure Setting the right time step is always a good thing, for the quest it is 1/90, but there is also some wacky oculus code in the LocomotionTeleport script that causes the fall. You have to comment out line 787.