New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ARF 2.1.0] ARRaycastManager doesn't find planes within infinity #135
Comments
This behavior did change in 2.1, and it's pretty subtle. ARCore doesn't really support a You can also query for which types of |
Hi, thanks for the explanation as always. I have been experimenting with the different trackable types, but none are anywhere near as forgiving as the infinite behaviour in 1.0. Is there any way to get that exact behaviour? In 1.0, when querying the plane within infinity, it would literaly alway find a plane. |
Hi, I'm trying to achieve the same behavior as @nilsk123.
There isn't any way to do this ? Even with a custom |
Yes there is, on iOS, you would only have to check againt the raycasts from the Trackable type TrackableType.PlaneWithinInfinity, as it works as expected. For Android, what you can do is, first check for either a camera raycast or Raycast Manager raycast:
and inside that condition get the first pose position from the ARplane that you get and spawn a 50 meter plane and then check the raycast to that plane and the ARplane at the same time.
this is just a general idea on how you can achieve this, it is possible. |
Please see this response: |
Hi,
We just migrated to these packages:
AR Foundation 2.1.0 preview 2
ARCore XR 2.1.0 preview 4
ARKit XR 2.1.0 preview 3
Unity 2019.1.3F1
Thank you for your continued efforts and support developing ARFoundation, it truely makes ar development much easier and more maintainable.
We use the ray version of the arsession/arraycastmanager to find infinite planes using the following code
Ray r = new Ray(transform.position, transform.TransformDirection(Vector3.down)); if (m_RaycastManager.Raycast(r, s_Hits, TrackableType.PlaneWithinInfinity)) { if(s_Hits.Count > 0) { hitPose = s_Hits.Last().pose; infiniteAnchor = m_ReferencePointManager.AddReferencePoint(hitPose); } }
This never returns a hit in the new arfoundation versions, eventhough arplanemanager indicates one or more planes have been found. This exact code works just fine when trying to find PlaneWithinPolygon, and has always worked fine for infinity too in previous versions.
The text was updated successfully, but these errors were encountered: