Unity-Technologies / arfoundation-samples

Example content for Unity projects based on AR Foundation
Other
3.02k stars 1.12k forks source link

Accessing the Rear Camera Input While Using ARKit Face-Tracking #977

Closed grayhong closed 2 years ago

grayhong commented 2 years ago

Hello!

I'm currently using ARKit Face Tracking feature via Unity ARFoundation, and I was wondering whether it is possible to receive rear camera input during using face tracking.

As explained in official document about Combining User Face-Tracking and World Tracking,

When tracking users’ faces in a world-tracking session, ARKit incorporates information from both the front and rear camera feeds in the AR experience. In addition to tracking the physical environment using the rear camera, ARKit uses the front camera to deliver an anchor that provides the position and expression of the user’s face.

It seems it is possible to incorporate both front and rear camera at the same time.

So I wonder if there is a way to get the rear camera input data during face tracking.

Thank you!

grayhong commented 2 years ago

I guess WorldCameraWithUserFacingFaceTracking is the one I'm finding.

ankur-unity commented 2 years ago

Yes, that sample will demonstrate the use of world camera with user facing face tracking feature. https://github.com/Unity-Technologies/arfoundation-samples#worldcamerawithuserfacingfacetracking