Search Unity

  1. Read here for Unity's latest plans on OpenXR.
    Dismiss Notice

Help Wanted Place Object on Plane: IOS the virtual object is transforming based on the plane detection direction

Discussion in 'AR' started by veldurtyharesh, Sep 2, 2021.

  1. veldurtyharesh

    veldurtyharesh

    Joined:
    Jun 26, 2020
    Posts:
    4
    I have simple app in landscape mode. As soon as the scene starts it will track for planes and as planes detected tapping on the plane an object is placed(the 3d model will be facing me).

    Working - when I scan in front of me find a plane and place a model. Here the models is facing me
    Not working - when I start scan in front of me and find a plane , Move the camera to right/left and find a plane on right/left and place the model, The model is not facing me it is transformed to some other direction.

    This issue is happening only in iPhones, Androids are working as expected.

    I tried with arfoundation samples , I see same issue happening in iPhones.

    Any help how this works?

    Versions:
    ARFoundation 4.1.7
    ARKit 4.1.7
    Unity 2020.3.14f1

    Tested Devices:
    All iPhones- From IOS 11 to IOS 14.7.1
     
  2. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,676
    Connected with the team about this. This is an expected behavior. The pose from a RayCast is in AR space and not the camera space. They advised that you should rotate the virtual object based on the use case.
     
  3. veldurtyharesh

    veldurtyharesh

    Joined:
    Jun 26, 2020
    Posts:
    4

    Hi , Thanks for confirming. Found out that the device camera Y-axis is different in iPhones and Androids.
    So using Camera.LookAt() , Now the 3D Model always be facing camera.
     
unityunity