Hi,
In ARSticker on Pixel 2, I can place a virtual object without detecting a plane. How to implement it using ARCore API?
Thanks
Hey, you could implement your own raycasting and find the closest depth point using the buffer of the current point cloud.
@stetro Thanks for your response. But the ARSticker can place an object as soon as the camera starts. There're no depth points at that time, right?
I think depth points should be available almost immediately?
@stetro OK, I will verify it.
Hey @guohengkai,
You can use Frame's hitTest() function to get a List of HitPoint objects back: https://developers.google.com/ar/reference/java/com/google/ar/core/Frame.html#hitTest(float, float)
You can also wait to do anything until Frame.getCamera().getTrackingState() == TRACKING: https://developers.google.com/ar/reference/java/com/google/ar/core/Camera.html#getTrackingState()
According to the documentation, you shouldn't trust the pose estimations until the trackingState is in the TRACKING state.
Thanks @stetro and @achuvm for responding to this. Good job!