Unity-Technologies / arfoundation-samples

Example content for Unity projects based on AR Foundation
Other
3.03k stars 1.13k forks source link

How to not stuck objects while we are near plane or any real objects #831

Closed Prashant29 closed 3 years ago

Prashant29 commented 3 years ago

How do I... I am trying to view a virtual wall on my wall, but when I get closer to it, it goes freeze, and after some space and movement, it works but changed its positions.

Please consider below video and pic for reference.

Thanks WhatsApp Image 2021-05-29 at 2 08 43 PM

https://user-images.githubusercontent.com/19671442/121701876-fc5e5580-caee-11eb-8d40-1f18de988966.mp4

Prashant29 commented 3 years ago

Any help or direction would be appreciated.

I'm using Unity: 2020.2.6f1 AR foundation: 4.2.0 Pre 2 XR Plugin Mangement: 4.0.1 ARCore XR Plugin: 4.2.0-pre.2

Prashant29 commented 3 years ago

@tdmowrer

Sorry for tagging without ask, but I need some reference or guidance. Thanks

tdmowrer commented 3 years ago

A blank wall makes it very difficult for any AR SDK (ARCore in this case) to work out its position in the world. There needs to be some visible features that it can track from frame to frame. Wood grain, an image, or some other feature will help greatly.

Prashant29 commented 3 years ago

Thanks for your reply @tdmowrer.

Actually, I'm trying to achieve something similar to this: https://youtu.be/ErdC8kOUQN0

If any idea 💡 , how it is possible, please guide me. Thanks.

tdmowrer commented 3 years ago

The video appears to use ARKit. Newer iPhones have lidar sensors, which can provide better tracking data and may explain why they have better results.

Prashant29 commented 3 years ago

Thanks Again Tim, for reply. But I am expecting some more info if you can provide. I really need to solve this problem. If you can check this: https://youtu.be/NNrZRAcJrrY

This is working and Android also. I have strong feelings that this could happen with ARFoundation.

Thanks for your time. Really appreciate for help.

Prashant29 commented 3 years ago

Actually I'm curious how they can track planes using lean their device nad touch their notch to wall. Is there any functionality in ARFoundation.

Thanks

tdmowrer commented 3 years ago

In the second video, the wall has a lot of texture to it, and other objects (like the floor and door) are also visible. This makes it much easier for ARCore to track the device's pose in the world. There isn't anything you can enable in AR Foundation that will provide better device tracking; it really comes down to the environment you are in, and a large, featureless surface is a poor candidate.

I'm curious how they can track planes using lean their device nad touch their notch to wall.

That sounds like logic specific to their app, and I can't say how they are doing it from the video. Maybe they wait until the device is pointed down, or detect that it stops translating forward (because it hits the wall).

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Prashant29 commented 3 years ago

Thanks, Tim, For your review and suggestion.