Managing Trackables

Hey

Using the ARFoundation Samples project as an example, what is the best/correct approach to hide planes and point clouds in the scene once you have placed the object?

I understand you can disable the managers to stop the session detecting and adding more, but to clean out what has already been detected what is required.

For example: I can get access to the list of current of ARPlanes detected via the ARPlaneManager.GetAllPlanes(), and can either disable the MeshRenderer or disable the entire game object. Then disable the PlaneManager component on the session origin.

But is there more to be done to avoid issues?

Cheers
R

1 Like

Just to add to the above… I’m not sure if I am misunderstanding how ARFoundation is supposed to be used or if I have a bug.

I added the following code to the PlaceOnPlane.cs on ARSessionOrigin

planeManager = gameObject.GetComponent<ARPlaneManager>();
planeManager.enabled = false;

… just after you instantiate the spawnedObject.

My understanding is, disabling the ARPlaneManager will stop the session detecting and drawing new planes. And ultimately I can do the same for ARPointCloudManager… but Im just trying to get one working on IOS now!

It appears to work fine on Android (ie.stops generating new planes) and anchors the spawnedObject in the scene… but it causes the session to stop tracking/stall for a couple of seconds on IOS. The result is the existing planes, point cloud and placed object float away from their anchor point as I move the camera, the point cloud also appears to freeze (like its not updating), then the point cloud starts to update again and the plane and placed object anchor in the scene…

The code works fine in Android build.

Unity 2018.2.10
ARFoundation 18
ARCore 19
ARKit 14

Samsung S8
iPad 2017

Here is the profiler when I disable the plane manager. Appears the XRUpdate stops calling InvokePointCloud… for the duration of the stall I am experiencing during tracking.

Anyone else having trouble disabling the ARPlaneManager on IOS? All I’ve added to the Sample scene is the lines of code mentioned above. This does not occur on Android. I have another issue on Android, in that changing from an AR scene to another scene stalls for 5+ secs… and that doesnt happen on IOS.

I am using ARFoundation because I want the scale functionality… but Im only trying to test the simple sample scene provided for now to get familiar

@jimmya Any thoughts on this? Anything I can check on my build settings? All I am doing in my test at the moment is disabling ARPlaneManager in the SampleScene after I have placed the cube and it causes AR to loose tracking and the point cloud to stop updating for 6seconds? Only on IOS.

Cheers

1 Like

We’re experiencing the same issue - Disabling or destroying the manager is causing the placed object to float off for a few seconds and then snap back. Only evident on iOS, android is much more stable.
It might be a shot in the dark too, but it does appear to be more common/worse looking on iOS 12/beta.

3 Likes

BUMP

Hello!
I’m experiencing problems on this subject.
I will try to clean only the planes and leave activated the ARPlaneManager.
It certainly is a little unstable

Hey guys, anyone get this issue sorted? I was just talking about it on another thread… also talking about disabling plane detection etc… (a common discussion in these forums due to the lack of sample code)

Cheers

@Edur-Games Hey, this is being discussed again on another thread. I never got it solved 100%… Did you ever sort it?
Thanks

Hello!
I haven’t solved it either. We will have to wait for some update on this, meanwhile continue with the Arkit plugin that seems more stable…

@tdmowrer hi, are you experiencing this issue on ios? Ie. Tracking stalls when ARPlanemanager is disabled… and planes, cloud & placed object floats for a number of seconds before eventually snapping to original location and anchoring.
Thks

@tdmowrer I would love to know if there is a fix the floating issue or even a work around if you know of one for iOS. I have a App Store push at the end of the week.

There was a bug in the ARKit package, which was fixed earlier this week. Please update to the latest ARKit package in Window > Package Manager within Unity.

Glad to hear this should be fixed.

Does this require a min ver of unity, arfoundatiin and target ios? I want to test this.

Thanks

Just got eyeballs on your update announcement… will comment there

Unity 2018.1, iOS 11.3 (12 to use ARWorldMap). The latest version of the ARFoundation package is only needed to support some features of ARWorldMap.

1 Like

Hello!
It seems that the problem has been solved that there were vibrations and stability. I’ve tried it on my project and it works a lot better.
Thank you very much and congratulations on the update!