Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Unity wants to learn about your experiences working on a Unity project today. We'd like to hear from you via this survey.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  4. Read here for Unity's latest plans on OpenXR.
    Dismiss Notice

VR real time positioning / facing?

Discussion in 'AR/VR (XR) Discussion' started by Tezelian, Jul 9, 2018.

  1. Tezelian

    Tezelian

    Joined:
    Oct 22, 2013
    Posts:
    256
    Hey guys,

    I modelled a room based on a real room so the objects in this room such as the sofa are quite accurately positioned so that in the VR world you can technically 'touch' and feel the objects if that makes sense

    But I have one problem and wanted to ask what I could do to overcome this obstacle if it was possible.

    I have marked the floor so the user must start from that specific position and must face forward at the TV or the VR environment won't match the real environment and everything in VR would be rotated based on the starting position and where the user is facing

    So my question is, what can I do to update the VR in real time or accurately communicate to the VR where the player is standing so it doesn't matter where the user look at, they are always facing the correct position and it updates correctly.

    Basically the starting position is the facing forward position or in my case looking at the TV but what if the user was looking at the window in the real world, I want the user to see the window, not the TV in the VR world.
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,437
    Well that will happen automatically if you start the user out in the correct position, and there is no drift in position/orientation tracking over time. (Which should be the case with room-based tracking such as the Vive.)
     
  3. Tezelian

    Tezelian

    Joined:
    Oct 22, 2013
    Posts:
    256
    ah s
    Ah there's no way to update it based on the starting position? I mean although I will direct the user to face the right direction, what if they suddenly tilt their head a bit to the right or left. Realistically the TV should also be oriented or to the left or right of them but instead they will see the TV dead straight based on where I put the VR camera in the Unity environment.
     
  4. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,437
    I don't understand. The VR system automatically moves the Unity camera when the user moves their head. That's the whole point of 6DOF tracking.

    So if they suddenly tilt their head a bit to the right or left, they will see the virtual world suddenly tilt to the left or right as it should.
     
  5. Tezelian

    Tezelian

    Joined:
    Oct 22, 2013
    Posts:
    256
    So in the real physical room the TV is on the wall and in the vr world which is based on and identical to the real room created on Unity, the VR camera prefab is facing the TV so when the user puts on the headset and starts the application, they will see the TV in the VR world which is where it is in the real world. I even marked the floor with a square and a pointer to allow the user to know which direction to look at and stand on to start at the exact position of the real world.

    However, if they look right or left in the real world, and then begin the Unity application, they will still see the TV in front of them which I don't want. They should be seeing the sofa or the whiteboard. I want it to update.

    I want them to actually see the areas they are facing in the real world, if that is even possible ;)

    So the VR environment is based on the actual real room. You start where you actually stand, there is a sofa on the right in the real world and the same position in the vr world. But if the player looks at the sofa they will still see the TV in front of them so the location or position basically doesn't update

    If I could get the position of the VR player tp update based on the location I wouldn't need to add markers on the floor. The player can start anywhere in the vr world and be facing the right objects in the real world.

    My VR world is based on the actual real physical room.

    So i created a sofa you can basically sit on and feel
     
  6. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,437
    Oh, I see. I thought we were assuming they would start in the correct position and orientation.

    What VR system are you using? If it's Vive, for example, you should have full 6DOF tracking. So the system "knows" not only the position but also the orientation of the headset relative to the room-mounted sensors.

    Yes. That's the simple question you should be asking — how to get the actual position and orientation of the headset in the room. But you need to specify what system you're talking about.
     
    Tezelian likes this.
  7. Tezelian

    Tezelian

    Joined:
    Oct 22, 2013
    Posts:
    256

    Unfortunately it is the Oculus :( Any way to do this in the Oculus or is the Vive more favourable?
     
  8. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,437
    Oculus Rift or Go?

    I'm the wrong hombre to ask (unless it's the Go, which simply can't do what you're asking). I'm a little vague on how the Rift does its position tracking. But that'd be the thing to search for: how to get the absolute position/rotation of the headset on Oculus Rift.
     
  9. Tezelian

    Tezelian

    Joined:
    Oct 22, 2013
    Posts:
    256
    Just the Oculus, I will search for more information about position tracking, nonetheless thank you so much

    At least you made it aware that the HTC vive would be the most suitable for this kind of project with its 6DOF tracking!

    Planning to buy a HTC Vive soon anyway :)
     
  10. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,437
    No, there is no such thing. It's either an Oculus Rift or an Oculus Go. Oculus is a company; Rift and Go are the products they sell.

    You'll get a lot farther faster if you figure out what you have, and be specific about it when you search or ask questions.

    I never said that. As far as I know, the Oculus Rift (but not the Go) has essentially the same 6DOF tracking. I'm just not as familiar with how it works.
     
  11. Tezelian

    Tezelian

    Joined:
    Oct 22, 2013
    Posts:
    256
    Oculus Rift, the problem is that the sensors are not tracking the position of the head and direction the user is looking at until you start the application. If it could track it before then it could ultimately determine the actual look position.

     
  12. LocalsOnlyCoop

    LocalsOnlyCoop

    Joined:
    Mar 8, 2019
    Posts:
    9
    I don't suppose you ever solved this, because I'm running into similar issues.
     
  13. Rarceth

    Rarceth

    Joined:
    Oct 15, 2015
    Posts:
    40
    Hi guys, just some thoughts that may help :)
    What you need is a shared point of reference (or preferably two) between your virtual and irl spaces.

    Now, what I have used before is a set of pedestals in the centre of the level, the idea being that the top of those pedestals would align with a specific place IRL (for me, I made it marked spots on my kitchen counter). So, the player walks to the place IRL, and then uses locomotion to move their virtual self to the appropriate area. Controllers set on pedestals / marked spots, then make the player look at a position.

    From this info, you get position and orientation of the player compared to the level. Its clunky and annoying, but without a singular system observing both player states, you cant really get better (open to ideas).

    A good example of an external system is the Vive Cameras (get player position irl, convert to virtual position), or my favourite, the Alt, which uses IR receivers on the headset, hands, props, etc, to view a series of IR diodes embedded in foam flooring. That way, its still inside out tracking, but with a irl physical link. Bloody expensive though.
     
unityunity