Search Unity

[Hololens] How to locate an obj in space precisely

Discussion in 'VR' started by NaiJiaoMao, Oct 10, 2018.

  1. NaiJiaoMao

    NaiJiaoMao

    Joined:
    May 4, 2018
    Posts:
    2
    Lately I was stucked by this issue,I could display the view,which is filmed by hololens, on my PC unityProgram,and I want hololens to put a sign on target after I clicked ,for example,a toy in PC's view as my target.But via my method it turned out that the sign was placed on the spot 2 or 3 inches away from where I wanted it should be.I don't know how to get the sign more precisely placed:rolleyes:,Below is my work flow.
    1、Open the spatial map
    2、Wait for seconds till the meshes were built.
    3、Click the target spot(a toy) in PC Screen view and transform the position by scale(for example this point is locate in PC screen's 192,108 and the screen's size are 1920*1080 then the scale is (0.1,0.1),in Hololens, the Screen position will be( HololensCamera.Screen.width *0.1),HololensCamera.Screen.height *0.1)).
    4、Use the Hololens Screen Point make a Ray via HololensCamera.ScreenPointToRay.
    5、The Ray hits the meshes and spawn the sign(sometimes the sign is close to the target spot).
    I've viewed some thread about using the locatable camera to make the precise location,but I was confused by how to get the Ray from it.:(
     
  2. NaiJiaoMao

    NaiJiaoMao

    Joined:
    May 4, 2018
    Posts:
    2
    anyone get a idea to share?:)
     
  3. Jarediavionic

    Jarediavionic

    Joined:
    Jan 6, 2017
    Posts:
    71
    Have you looked at vuforia object recognition?