Search Unity

Question ARF Scaling example in a Simulation

Discussion in 'Unity MARS' started by DoAugMenRo, Dec 30, 2020.

  1. DoAugMenRo

    DoAugMenRo

    Joined:
    Sep 17, 2019
    Posts:
    18
    I was doing something similar to the Scale.unity sample of the AR Foundation samples. I used SessionOrigin.MakeContentAppearAt(). In Game mode i would hope to seemingly only rotate and/or scale the selected content. Instead the simulation is seemingly scaled/rotated. How this looks like is visible in the attached image. How can i fix this in a simulation?
    Thank You! ScalingIssueMARS.png
     
  2. mtschoen

    mtschoen

    Unity Technologies

    Joined:
    Aug 16, 2016
    Posts:
    194
    Hi there! I think you've found a bug. We don't update the simulated environment position when you change your session origin, which yields these kinds of results. We will be working to fix this in a future release. Thanks for sharing this!
     
  3. DoAugMenRo

    DoAugMenRo

    Joined:
    Sep 17, 2019
    Posts:
    18
    I'm sorry i formulated it unclear. I do not think that this is a bug. The Simulated environment stays exactly where it is. Only the cam and the trackables do move and this makes it seem, from the cameras view, as if the simulated environment and the object (the black box with the red dot) are rotating. However if i deploy the exact same scene to the smartphone and rotate, then only the object is rotating while the real environment is not. And it is this effect i would like to mimic in the simulation.

    The object should exactly keep its transform, while the camera, trackables and environment change, so that the object it self seems to be scaled/moved/rotated. Tim explained this very well. This would for example be helpful to seemingly scale nav meshes an terrain in AR. Is there a method to do this? Or is it possible to scale the simulated environment at runtime? Can i for example make it a child of the ARSessionOrigin?

    Thank You!