Search Unity

Handling Collisions and Terrain with Room Scale Tracking

Discussion in 'AR/VR (XR) Discussion' started by Bovine, May 30, 2019.

  1. Bovine

    Bovine

    Joined:
    Oct 13, 2010
    Posts:
    88
    Hi All

    I've been playing about with the Quest the last week or so, and loving it. I've been looking to develop an FPS that supports room-scale tracking, but I see some problems with this and wondered how the community are handling this already. I have done some googling and searching but not found anything concrete.

    At present I am using a character controller and moving the controller, the root object of my camera rig using the thumb sticks on the touch controllers. Naturally the head position and orientation is coming from the head tracking provided by the Oculus integration. This effectively puts the player at a location other than where the CharacterController is. This is not ideal and leads to clipping issues and also the player does not then walk up stairs when expected, because the character controller is not on the stairs.

    I can drive the controller directly using the headset position in addition to the movement supplied bu the player, ensuring that moving withing the room-scale space has a direct impact on the CharacterController. However I wonder if this poses problems when players do things such as lean out over drops or around corners as I don't believe there is a usable way to detect a lean from a player, over actually moving to the spot being leaned over.

    Any thoughts would be welcome, and in particular solutions, would be welcome.

    Cheers
    H
     
  2. Bovine

    Bovine

    Joined:
    Oct 13, 2010
    Posts:
    88
    Just a follow up to say that this isn't handled well on say Vader Immortal either. I purposely loaded the escape chapter where there are a couple of stairs - walking up them physically does not work and the floor height does not alter.

    Clipping is handled bad fade to black if I try to move through an object.

    Vader doesn't permit free movement - it's teleportation and then you can wander in your room scale, so it doesn't have the issue I do.

    I tried moving the controller as the head moves and while this works, there is the issue of colliding with something. I guess I can try fading to black on this, but it's unlikely to work - basically I have moved physically in the real world and my controller is blocked by the virtual world - it appears to push the world backwards, possibly this is just because my guardian is visible however.

    I am wondering if it matters mind as the tracking does still work... Hmmm fade to black then...
     
  3. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,617
    Vader permits free movement in the options. Another game is Red Matter, which is basically a classic FPS environment.
     
    ROBYER1 likes this.
  4. Bovine

    Bovine

    Joined:
    Oct 13, 2010
    Posts:
    88
    Yeah I saw this option only today on chapter 2. Don't recall it offering me any free movement on day 1 tbh so maybe that came in after.

    Wandering through stairs shouldn't be allowed IMHO.
     
  5. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,617
    I agree. One way of combating it is doing what QuakeQuest does but that kind of makes you sick fast with a modern environment (moving the collider to the HMD) and is fraught with risk (falling through the world etc), and will need some quite good handling of spatial queries to not cock that up.

    QuakeQuest does cock it up sometimes and I got myself into a nice little black void as one does.