How can i stop detecting planes in ARCORE v1.2.0 by giving user feature to stop it by pressing any button or any sort of command?
Hi, to stop Plane Detection, you have to update the SessionConfiguration and set PlaneFindingMode to Disabled. You can do this at runtime. Let me know if this helps.
Hi @pablisho and if I want to hide the plane without stop it?
@robrtoprz If you just want to stop the visualization of the planes you can disable the MeshRender Component and the DetectedPlaneViszaulizer Script for each plane.
I gave my plane prefab a tag "Plane" and with following function I can change if the planes are visualized or not. (Note the planes will still be tracked even if they are not visualized):
public void VisualizePlanes(bool showPlanes)
{
foreach (GameObject plane in GameObject.FindGameObjectsWithTag("Plane"))
{
Renderer r = plane.GetComponent<Renderer>();
DetectedPlaneVisualizer t = plane.GetComponent<DetectedPlaneVisualizer>();
r.enabled = showPlanes;
t.enabled = showPlanes;
}
}
@markusfehr It's what I was looking for, thank you so much, it works perfectly!
Thanks @markusfehr for the explanation and help. @zakria257 I'm closing this as I believe your initial question was solved. Feel free to reopen if you still experience issues with this.
Hi, to stop Plane Detection, you have to update the SessionConfiguration and set PlaneFindingMode to Disabled. You can do this at runtime. Let me know if this helps.
I am trying to update the SessionConfiguration detect vertical planes, is it correct?
arSceneView.getSession().getConfig().setPlaneFindingMode(Config.PlaneFindingMode.VERTICAL);
How do you know if ArCore has successfully detected a plane? Is there a callback function for that?
@markusfehr Thanks for the help, it saved me a lot of time
@markusfehr Thank you so much its working pefectly you saved me lot of time.
Most helpful comment
@robrtoprz If you just want to stop the visualization of the planes you can disable the MeshRender Component and the DetectedPlaneViszaulizer Script for each plane.
I gave my plane prefab a tag "Plane" and with following function I can change if the planes are visualized or not. (Note the planes will still be tracked even if they are not visualized):