Improved fingers binding

Mechanim filtering
This commit is contained in:
SDraw 2024-04-04 09:00:36 +03:00
parent 5bec2fcdb1
commit 00c92e1913
No known key found for this signature in database
GPG key ID: BB95B4DAB2BB8BB5
19 changed files with 557 additions and 239 deletions

View file

@ -200,13 +200,13 @@ namespace ml_bft
l_tracking.GetHandJoints(m_left ? HandTrackingFeature.Hand_Index.L : HandTrackingFeature.Hand_Index.R, out var l_positions, out var l_rotations, out _);
if(l_positions.Length >= c_fingerBonesCount)
{
// Joints rotations are in global space, locations are in local space ... wth is wrong with OpenXR?
// Joints rotations are in global space, locations are in ... space??? ... wth is wrong with OpenXR?
Quaternion l_prefabRot = m_prefabRoot.rotation;
for(int i = 0; i < c_fingerBonesCount; i++)
{
if(m_bones[i] != null)
{
m_bones[i].localPosition = l_positions[i];
//m_bones[i].localPosition = l_positions[i];
m_bones[i].rotation = l_prefabRot * (l_handInv * l_rotations[i]);
}
}