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. Dismiss Notice

Falling through the terrain

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

  1. KenniKure

    KenniKure

    Joined:
    Aug 7, 2019
    Posts:
    39
    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. Digilithic

    Digilithic

    Joined:
    Nov 1, 2018
    Posts:
    15
    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:
    95
    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:
    39
    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:
    73
    @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.
     
  6. pixeleif

    pixeleif

    Joined:
    Feb 9, 2016
    Posts:
    15
    Hi, brand new to the Quest.
    I've been trying to get this going and I'm having the same issues. Tried moving the player up and made sure it's above the plane. Duplicated said plane and put it under to check if that plane can "catch" me. Tried setting time stamp to 1/90 and commented out line 787. Nothing helps. Some times it works, others i fall through....

    Any help would be appreciated.

    Ps: I'm on Oculus integration 1.37, Unity 2019.1.12f1
     
  7. pixeleif

    pixeleif

    Joined:
    Feb 9, 2016
    Posts:
    15
    Upon further testing ( Turned off Gravity modifier for OVRPlayerController) i see i'm not falling through, but get teleported way off my plane.... Even though I'm pointing fairly close to where I stand.
     
  8. tom532

    tom532

    Joined:
    Jun 18, 2020
    Posts:
    2
    old post but no anwer; i'm pretty sure the issue is that you have not marked your mesh collider as 'convex' (allowing meshes to collide)