This repository has been archived by the owner on May 25, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
NOTE
This does not function fully yet. I will continue to work on this however I am putting the idea forward as you will more than likely be able to do a better job of it than me.
What is this?
This code proposes the idea of flipping the joints so that when the player turns around the kinect will still track the player. It won't be as reliable as if they were facing forward but thats to do with the Kinect.
Why is this useful?
The Kinect cannot tell if a person is facing the camera or not so instead what you could do is take the rotation of the VR headset and detect if they are facing away from the camera. If they are then the joint data should be flipped so that the tracking points do not get mixed when turned around.
My issues:
From my short testing I have managed to detect if the headset is facing away from the Kinect and then flip the joints/yaw, however when turning around it would seem that there is a lot of rotation drift in the joints.
I am also not quite satisfied with how I am calculating these rotations as I have extremely little understaind of quaternions (and quaternion multiplication) so I have been converting them to euler angles and then back again. I dislike this approach because it adds a lot more work for the CPU to do.
So I am pushing this incomplete code to you to present a possible solution for turning around in VR using the kinect (its not bulletproof but its better than nothing). I dont expect you to use this code as it is more than likely not the best and most efficent way to do it, if you have time to work on a solution that would be great, in the meantime I will keep having a go at this.