Search Unity

Question AR camera Angle measurement

Discussion in 'AR' started by aegiswang, Feb 11, 2021.

  1. aegiswang

    aegiswang

    Joined:
    Jan 8, 2021
    Posts:
    2
    Hello everyone!
    I have a question, please help and thanks!
    I want to know how to show the Angle information(degree) between AR camera and target object on a plane. (Using Smartphone)
    And I want to know how to "code" with Unity and AR Foundation.

    Thank again!
     

    Attached Files:

    • 01.JPG
      01.JPG
      File size:
      18.6 KB
      Views:
      320
  2. FrankvHoof

    FrankvHoof

    Joined:
    Nov 3, 2014
    Posts:
    258
    AngleBetween(plane.normal, camera.forward)?
    This would be the 'opposite' angle of the one in your image (the angle between the 'up' for the plane, and the line in your image).
    The angle in your image would thus be (90 degrees - AngleBetween())