08-25-2024 07:53 PM
I am using the Anchor Prefab Spawner in a Mixed Reality Project, but it is not functioning to my satisfaction, and I was wondering if there are any improvements I can make.
I made a Mixed Reality Unity Project using the MRUK and Meta's All In One SDK. I scanned a 3d object and imported it into my MR scene as a prefab. My goal is to overlay the real-world version of the object with my virtual 3d model, and the best way I have seen to do that is with the Anchor Prefab Spawner (since object detection is not available on the Quest 2).
The Anchor Prefab Spawner does place the prefab where I labeled the real-world object in my Scene Setup, but it looks all weird and distorted. The prefab becomes dark and loses the vibrance it has when looking at it in the editor (could be a shader issue). The prefab also has a lot of trouble spawning at the same orientation and scale as the real-world object. I believe this is because the Anchor Prefab Spawner solely uses the scale and rotation of the box volume that I created as part of Scene Setup and has no way to orient itself in the space. Also, the virtual model gets distorted when looking at it because the headset is trying to render the 3d model and the real-world object in the same position.
If anyone has any solutions to these problems or some ideas for scripts that I could write to improve the experience, please let me know!