I am creating an application with Hololens and Unity. The user can place objects in his room. The goal then is to save the position of these objects once the user places them so that when he reuses the application, they are in the same place as in the previous session.
I read that in this case it is possible to use Spatial Anchors, is that correct?
But now comes the more complicated part. The second objective is to use the application with the objects placed by the user in his room, in another, completely different room, making these objects appear in the most similar positions possible. Let me explain better with an example: In chamber A the user places an object in the right corner of the chamber. The user then moves and goes to room B. he starts the application. At this point I would like the object to also be in room B in the right corner of the room. How could this be done?
Once this is done it should be considered that the right corner of chamber B may not be empty. For example, if there was a cupboard, the object should always be positioned in that direction but further ahead of the cupboard so as not to go over it.
Thank you in advance!
If the rooms are really similar, Azure Spatial Anchors (ASA) could get confused and return the anchor in the other room too - this is possible but rare, and should it happen, this is a bug rather than a feature.
Showing an hologram in a shifted position avoiding a real physical object is not supported by ASA directly. When the anchor is returned, you may want to shift it by detecting a surface with other feature called Spatial Mapping.
Not quite fit to your specific scenario, but there's Object Anchor - with which you can detect a specific object - in this case, it doesn't matter where this object is located.