NeoSpark314/godot_oculus_quest_toolkit

Undo the workaround of clearing the hand tracking bone rest positions

Closed this issue · 1 comments

As in this function:
https://github.com/NeoSpark314/godot_oculus_quest_toolkit/blob/master/OQ_Toolkit/OQ_ARVRController/scripts/Feature_HandModel.gd#L247

It looks like a cleaner work-around/transform is to apply the inverse of the rotation of the rest position before assigning the pose value:

https://github.com/NeoSpark314/godot_oculus_quest_toolkit/blob/master/OQ_Toolkit/OQ_ARVRController/scripts/Feature_HandModel.gd#L276

Instead of:

skeleton.set_bone_pose(_vrapi2hand_bone_map[i], Transform(_vrapi_bone_orientations[i]));

do

var j = _vrapi2hand_bone_map[i]
var bone_rest = skeleton.get_bone_rest(j);
skeleton.set_bone_pose(j, (bone_rest.basis.inverse()*Basis(_vrapi_bone_orientations[i])))

This might work more within the grain of how the bone posing system works. I'm sure there's a method in its madness, though I can't see it yet.

resolved by #61