Acurate measurement of position and orientation in 3D

Hello,
I and a friend are working on making a VR glove. We want to track position(and rotation) of every finger and the wrist. We are currently trying to do this using MPU6050 to track rotation and using Inverse Kinematics to get the rest(however getting position from the rotation for the IK is not ideal).
The problem is that the orientation drifts over time(MPU6050 does not have magnetometer) and that this way we cannot track whether the fingers are being moved by the first or second joint of the hand(i don't know their names, sorry). Also, as far as I know, you can't get a position in 3d space from a rotation.
We are currently trying to do this using projection, but it seems that there may be better ways.
We thought about using flex sensors(and tried making our own) but we would need too many to have an accurate measurement on the finger position(tracking sideways movement, tracking which bone is being moved, etc).
We also saw that there was an approach using bright lights and cameras(or IR lights and IR camera), but I don't know how accurate it will be.
The way I thought we could do this is by getting a precise measurement of the last bone of each finger and apply Inverse Kinematics to get the rest of the bones lined up, instead of measuring everything.
The question stands tho. What is the best way to measure that position in 3D space?
any ideas, links, thoughts are appreciated.

The problem is that the orientation drifts over time(MPU6050 does not have magnetometer)

That can be fixed by using a 9DOF sensor and better software, but the resulting 3D orientations won't be more accurate that +/- a few degrees.

You might consider measuring the 3D position using Pozyx.

jremington:
That can be fixed by using a 9DOF sensor and better software, but the resulting 3D orientations won't be more accurate that +/- a few degrees.

You might consider measuring the 3D position using Pozyx.

Thank you for the reply. Since we can't get cheap 9DOF sensor in my country(the delivery tax is too high) we were thinking about getting a HMC5883L magnetometer with the MPU6050 and use Madgwick filter to get the orientation and calculate position.We need to get position in space more than we need the orientation. The orientation may drift over time but is accurate enough compared to the position measurements. The Pozyx device you linked to is good, but is too bulky. We want to track the position of each finger independently. I know that getting position from MPU6050 is tricky and inaccurate if you don't have constant reference, but can we use a GPS sensor or something to track the position of the wrist and use is as reference for the other sensors?

HMC5883L magnetometer with the MPU6050

That will work, if you calibrate the magnetometer according to this tutorial (essential step).

can we use a GPS sensor

That won't work indoors, and the position error is way too high (+/- meters).

jremington:
That will work, if you calibrate the magnetometer according to this tutorial (essential step).That won't work indoors, and the position error is way too high (+/- meters).

Ok, I'm going to try combining the magnetometer with the MPU6050. Meanwhile, I was searching for other ways to track position and I saw a couple of other approaches using bright LEDs and a camera, IR LEDs and IR camera, wifi tracking, Bluetooth tracking, and others. I want to know how accurate they are compared to each other and what advantages/disadvantages each has. Thank you again for the help.