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.

DK2 Positional Tracking in 5.1

Discussion in 'AR/VR (XR) Discussion' started by senritsu, Jun 9, 2015.

  1. senritsu

    senritsu

    Joined:
    Dec 12, 2012
    Posts:
    37
    Hello everyone,

    Just tried out the (awesome) Rift integration in 5.1, but i have no idea how to enable positional tracking. Any clues?
     
  2. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Set VRSettings.enabled = true;
    you also need to enable "virtual reality supported" in player settings.

    All normal cameras will then be rotated and moved relative to the oculus movement sensor.
     
  3. senritsu

    senritsu

    Joined:
    Dec 12, 2012
    Posts:
    37
    I did enable vr support in the player settings, but that only resulted in rotational tracking. VRSettings.enabled also changes nothing, positional tracking is still not working.
     
  4. thep3000

    thep3000

    Unity Technologies

    Joined:
    Aug 9, 2013
    Posts:
    367
    Is positional tracking working in the Oculus Config Utility's "Show Demo Scene" ? As LennartJohansen says, cameras will receive positional and rotational updates by default.
     
  5. senritsu

    senritsu

    Joined:
    Dec 12, 2012
    Posts:
    37
    Yes, demo scene works just fine. The last demos i tried worked fine too, although i haven't tried a lot with SDK 0.6 yet. If it should work, maybe i should just try reinstalling the runtime and unity.
     
  6. Todd-Wasson

    Todd-Wasson

    Joined:
    Aug 7, 2014
    Posts:
    1,077
    I'm not really sure about this, but to get the translational stuff you might need to make the camera a child of another game object. An idea to try anyway if nothing else is working.
     
  7. senritsu

    senritsu

    Joined:
    Dec 12, 2012
    Posts:
    37
    Yeah, i thought of that too, but it didn't work out D:
    Reinstalling the runtime and unity also did nothing.
    Not sure what else i can try.
     
  8. apha

    apha

    Joined:
    Mar 30, 2015
    Posts:
    1
    Thought I had the same problem. Then realized that I was testing in a cartoony scene we built that had no relation to real world scale. i.e. the scale was crazy big, and I just couldn't see the positional changes.
    Try with an new empty scene, with some default size boxes (1x1x1meter).
     
  9. senritsu

    senritsu

    Joined:
    Dec 12, 2012
    Posts:
    37
    I actually made a new blank project to play around with the new rift integration, so that should not be an issue.
     
  10. EdBlais

    EdBlais

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    296
    Are you using a DK1 or DK2?
     
  11. senritsu

    senritsu

    Joined:
    Dec 12, 2012
    Posts:
    37
    DK2, otherwise positional tracking would not make much sense, right? ;)
     
  12. EdBlais

    EdBlais

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    296
    Exactly, lol. So you are getting all of the Rotational data, but just the positional tracking isn't working. Try making the camera a child of a new object. Do you receive any warning or error messages in your Editor log?
     
  13. senritsu

    senritsu

    Joined:
    Dec 12, 2012
    Posts:
    37
    Ok, so apparently after 2 days of un-/reinstalling everything related to unity and the rift, the problem fixed itself.

    Can't really say what it was though. Everything i did, i tried at least 3 times, without any success on the earlier attempts. The only other factors in between were a full pc crash without any cause in the windows event log, and a few recalibrations of my leap motion.
     
  14. Pingly

    Pingly

    Joined:
    Jun 14, 2015
    Posts:
    10
    I have this issue as well. A new project with latest version of both Unity and Oculus SDK. No positional in my project but it works fine in Oculus calibration tool. I guess I will try reassembling things to recover it.
     
  15. EdBlais

    EdBlais

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    296
    Unfortunately we haven't seen this issue and we do not have any bug reports that display the issue. If you can reproduce it, it would be worth either sending in a bug report or reviewing the Editor log yourself to see if there are any noticeable errors that are logged.
     
  16. olavrv

    olavrv

    Joined:
    May 26, 2015
    Posts:
    481
    We are also experiencing this, especially when running Unity VR application over longer periods of time.

    Also both positional tracking and head tracking freezes - resulting in a frozen image inside the rift (this also when running applications for a longer period of time).

    We have experienced this consistently on all drivers (oculus and NVidia) and Unity versions since april 2015 up ontil todays available versions.