When i attach an ARReferencePoint to an existing plane everything works as expected. However, as the user moves around and new trackables are detected, sometimes our reference points will shift. I'm wondering if there is a way to keep the reference point from shifting as new trackables are found. Is there a way to catch when this is changing (referencePointUpdated?) And determine how much the position is changing and then undo that translation? I know there are recommendations to place new reference points every so often if the user is moving large distances because of this. I'm just wondering if there is a better way to do this. Thanks!
Following up on my previous post. Should I be able to get pose changes from referencePointUpdated and use the previous pose returned from this callback to maintain the same position in world space? For example sometimes as the app learned more about the environment the pose changes and shifts my reference point +1 meter to the side. Can I subscribe to the referencePointUpdated event and get the new pose and shift the reference point back to it's original position (-1 meter)?
So I was able to subscribe to the referencePointsChanged event and get a list of all updated reference points. I save the original transform position when the reference point is placed. On the referencePointsChanged event I set the transform position back to the original. Not sure yet if this is accomplishing exactly what I want. I do print out the original position and the updated position and see that indeed it does change the position and successfully sets it back to the original.
Unfortunately I have not. My next thought is to not anchor it to a plane but rather just add a reference point (instead of attach) at the hit point. This way when the planes pose changes it shouldn't affect the pose of the anchor. I'm not sure how much this is going to affect the stability but I plan in testing this soon.