Search Unity

Making a depth perception simulator, newbie programmer

Discussion in 'AR/VR (XR) Discussion' started by ChristinaKeller, Feb 23, 2017.

  1. ChristinaKeller

    ChristinaKeller

    Joined:
    Feb 23, 2017
    Posts:
    2
    HI

    I need to make a program for University, where there's different conditions where objects are placed at different defined lengths like 0,1 m, 1 m and stuff like that. And then the condition needs to change if the testsubject answers how far away the object is or two minutes have passed.
    Does anyone have an idea for how to execute it? Any advice is welcomed with open armes.

    Love Christina
     
  2. p1zzaman

    p1zzaman

    Joined:
    Jan 1, 2017
    Posts:
    64
    I assume the test subject in this case is the game player?

    How would he make the choice on how far away the objects are, what are the inputs? Anyway, you can always use the Vector3.distance function to calculate the distance from the objects to the player. Unless it is not relative to the player then you should calculate the distance of the objects to a static point in the game space.

    But be warned, VR is a bit tricky. The combination of low res and the 3d engine could make it difficult to get an accurate distance to a normal eye.

    -Rob