Getting head and finger orientation
Hey gang - glad to see a great support forum for the Oculus Quest 2 with Unity. I'm migrating an app from open XR to oculus to take advantage of the oculus hand tracking. I'm experiencing issues with the data (or lack of) and wondering if anyone can provide advice.
I'm using our existing client/server framework to send data to the server. The data is being sent and received correctly - but the data is strange.
The finger data never changes from the skeleton. During testing, I'm only sending the tip of the index finger on the right hand. The outcome is to get the amount of bend of each finger.
The camera transform sends the correct data, and it's working great. We just can't figure out how to get the finger data to know the position of each finger.
void Update() {
// send the index finger data
OVRPlugin.Skeleton skeleton;
if (OVRPlugin.GetSkeleton(OVRPlugin.SkeletonType.HandRight, out skeleton))
foreach (var bone in skeleton.Bones)
if (bone.Id == OVRPlugin.BoneId.Hand_Index3)
_streamClient.SendPacket(
StreamClient.CommandEnums.FingerRight0,
MapToByte(bone.Pose.Orientation.x),
MapToByte(bone.Pose.Orientation.y),
MapToByte(bone.Pose.Orientation.z));
// send head data (pitch, yaw, roll)
_streamClient.SendPacket(
StreamClient.CommandEnums.pitchYawRoll,
MapToByte(Camera.current.transform.localRotation.x),
MapToByte(Camera.current.transform.localRotation.y),
MapToByte(Camera.current.transform.localRotation.z));
}
Any assistance is greatly appreciated - thanks in advance!
