ARCore
shows a grid on a surface in the center of the camera's view. How to get Pose
of a central point of this displayed grid?
Asked
Active
Viewed 482 times
0

tse
- 5,769
- 6
- 38
- 58
-
I don't know, what are you asking for. Grid on a surface in the center of the camera's view. What do you mean? Arcore shows grid on planes not in the center of camera view. You want to find central point of grid you are actually looking at? – Vladimír Fencák Mar 23 '19 at 15:33
-
@VladimírFencák The goal is following. A phone doesn't move but rotates. ARCore detects next peace of surface (on the ground, for example) and displays the grid. I want to catch it, place a marker in the center of the grid, and display some extra info (distance from marker to another point, for example). When phone rotates and the displayed grid will be moved, marker also has to be moved, and displayed data recalculated. I can do it if the user taps on the grid, then I get an event with Pose and can do all calculations. But how to do it without interaction with the user? – tse Mar 24 '19 at 04:58
-
check [Frame.hitTest()](https://developers.google.com/ar/reference/java/arcore/reference/com/google/ar/core/Frame#hitTest(float,%20float)) Probably you are already using it in taphandler. You can set coordinates of the center camera and send ray in cycle and check what this rey hit if it is grid than you have grid and use your method to find center. – Vladimír Fencák Mar 24 '19 at 13:24