-
Notifications
You must be signed in to change notification settings - Fork 460
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding input option to connect to IPhone FaceID Tracking via Unreal Engine's LiveLink App #1423
base: master
Are you sure you want to change the base?
Conversation
…livelink-driver
do | ||
{ | ||
const qint64 sz = sock.pendingDatagramSize(); | ||
datagram.resize(sz); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't use malloc in the main loop.
// There is static data with length depending on IPhone name at the left of the datagram. | ||
// Our three head rotation values are located 9th from the right of the datagram. | ||
// Discard the rest of the face data | ||
datagram = datagram.right(sizeof(float[9])).left(sizeof(float[3])); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
malloc
// Discard the rest of the face data | ||
datagram = datagram.right(sizeof(float[9])).left(sizeof(float[3])); | ||
ok = true; | ||
QDataStream dataStream(&datagram, QIODevice::ReadOnly); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
malloc in QIODevice
} | ||
|
||
if (ok) | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move QMutexLocker
usage here.
datagram = datagram.right(sizeof(float[9])).left(sizeof(float[3])); | ||
ok = true; | ||
QDataStream dataStream(&datagram, QIODevice::ReadOnly); | ||
dataStream.setByteOrder(QDataStream::BigEndian); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Floats are always little endian. You can read into a union just fine.
Any reason why this PR is stalled ? |
any news on this? |
The iPhone Face ID sensors can accurately capture all sorts of facial expression data, including head rotation data. Unreal Engine has an app called Live Link Face that sends that is meant to send that data in real-time over to Unreal Engine. This data is just sent over UDP so it is easy to read and extract the head rotation data from.
I just added a new input, mostly copying the existing UDP input, but made it extract and format the data sent by the Live Link app.
One note is that Live Link only sends head rotation data, nothing on position.
Another thing to note is that the Face ID sensors are present on the iPhone X/XR/XS and newer, as well as the iPad Pro 3rd gen and newer.