Search Unity

arkit physical size for rectangular images

Discussion in 'AR' started by Lelon, Jul 22, 2018.

  1. Lelon

    Lelon

    Joined:
    May 24, 2015
    Posts:
    79
    When trying to setup an image to be tracked using arkit, the reference image has a physical size property, however we can only enter one value, what about rectangular images? where can we set the width and height separately?
     
  2. skymeson

    skymeson

    Joined:
    Sep 30, 2016
    Posts:
    15
    Wondering the same thing myself. It can be either width, height, or scale. I'm thinking scale because 1 is default and when I set to 0.5 it looks like image is roughly 1/2 size. Would be nice if they would update the documentation on this.
     
  3. todds_unity

    todds_unity

    Joined:
    Aug 1, 2018
    Posts:
    324
    Hi,

    The physical size represents the physical width of the image (possibly the field should be renamed as such). ARKit calculates the physical height of the image based on given physical width and the aspect ratio of the image.

    Code (CSharp):
    1. physical_height = physical_width / image_aspect_ratio
    Todd
     
    jimmya likes this.