# How To Move Ar Object alone Finger's Position when Camera is almost parallel with ArGround

Discussion in 'Handheld AR' started by xj1982xj, Jun 3, 2019.

1. ### xj1982xj

Joined:
Sep 19, 2017
Posts:
35
Hi Guys , i'm using arcore to find an AR Ground, then I init an object on top of this ar ground .

The question is how should I move this object on AR Ground in (x,z) axis follow my finger's position exactly ?
i follow this tutorial , but it only work when there are some angles between Camear and Ar Gound:

but when i move my Camera angle almost parallel with Ar Ground, and try to move the object , the movement of the object totally mess.

So , any idea about how to Move this ar Object alone Finger's Position on this ar ground no matter what angle of camera and ar ground is.

2. ### leon_r42

Joined:
Feb 24, 2016
Posts:
13
Use the Raycaster manager component (believe it's a new addition in foundation 2.0) to raycast the ground plane and move the object to the hit pose's position. I think most of the ground plane samples already use this kind of logic to place objects on the ground.

3. ### xj1982xj

Joined:
Sep 19, 2017
Posts:
35
Hi Leon_r42, thank you for your idea, i try it in my phone , and seems it is not what i want.

The SimpleAR Scene from AR Foundation Samples can only move the cube in the real detected ground area, when i want to move the cube follow my finger to the area which ar does not detect/cover, the cube just stop in the ar detected area.

what i want to achieve is :

when AR System detected a horizontal ground, the cube is just init on top of this horizontal ar ground at user hit position, after that the cube can move freely follow my finger whatever in or out of this ar detected area , which give the user the illusion that there seems an infinite ground that the user the move the cube freely , not block by above ar detected ground.

beside the move can still work perfect with finger move no matter what angle angle between camera and the cube ( even the camera is 0 angle with cube , the move can still work)

hope got answer from you or other may have solution for this.

Joined:
Feb 24, 2016
Posts:
13
5. ### xj1982xj

Joined:
Sep 19, 2017
Posts:
35
Hi Leon_r42 , thanks for your idea.
i think that will solve the ar ground area boundary issue.
How about the camera angle ?
Think if this cube is 3 meter high , and i just rise my phone to point at top part of the cube, and i just using my finger touch on the top part of the cube to move the cube , i think the camera ray can't detect this vast virtual ground because the angle between of camera and vast virtual ground is above 90 degree , and the ray direction is toward up , not down to ground.
so any idea about this case ?