In RealityKit using visionOS, I scan the room and use the resulting mesh to create occlusion and physical boundaries. That works well and iI can place cubes (with physics on) onto that too.
However, I also want to update the mesh with versions from new scans and that make all my cubes jump.
Is there a way to prevent this? I get that the inaccuracies will produce slightly different mesh and I don’t want to anchor the objects so my guess is I need to somehow determine a fixed floor height and alter the scanned meshes so they adhere that fixed height.
Any thoughts or ideas appreciated /Andreas
An obvious answer I thought of is to quantise the scanned mesh. An additional step of detecting outliers within a plane (as detected by a plane provider) and correcting them.
This would result in much stabler meshes that won't move other physics objects when updating the mesh.