Expo Face Detector Angle

438 Views Asked by At

I was trying to implement live face detection using Expo-Face detector; I encountered a mysterious problem in which turning left was not recognizable for ios, but worked properly for android; There was no documentation about it; I couldn't figure out how this could happen, cause Documentation and issues had nothing about it;

Now that I found the reason, I'm writing it in case somebody someday encounters this

1

There are 1 best solutions below

0
On

The reason is that The Angles in android are from 0 to 360, but in ios, they're from -180 to +180! So, when you turn left, the angle comes about 330 in android, but it comes about -30 in IOS;

So, be careful about it and make min/max Angle based on Platform. :) GLuck