cancel
Showing results for 
Search instead for 
Did you mean: 

Skeleton physical colliders pose not updated during hand tracking

paperli
Honored Guest
I run the HandsInteractionTrainScene in Quest with Unity, and find that the skeleton physical colliders are not updated with hand tracking pose. I only turn on the Render Physics Capsules and allow Hand Tracking Support in OVRCameraRig. Does anyone know what's going on?
You can see the footage in the attached zip file.
1 ACCEPTED SOLUTION

Accepted Solutions

paperli
Honored Guest
I found a fix. Change below lines in OVRSkeleton.cs,
if (capsuleGO.activeSelf)
{
capsule.CapsuleRigidbody.MovePosition(bone.position);
capsule.CapsuleRigidbody.MovePosition(bone.rotation);
}
else
{
capsuleGO.SetActive(true);
capsule.CapsuleRigidbody.position = bone.position;
capsule.CapsuleRigidbody.rotation = bone.rotation;
}
to this:
if (capsuleGO.activeSelf)
{
capsule.CapsuleRigidbody.gameObject.transform.position = bone.position;
capsule.CapsuleRigidbody.gameObject.transform.rotation = bone.rotation;
}
else
{
capsuleGO.SetActive(true);
capsule.CapsuleRigidbody.gameObject.transform.position = bone.position;
capsule.CapsuleRigidbody.gameObject.transform.rotation = bone.rotation;
}
Looks like assigning position and rotation to the rigid body doesn’t work at all.
Since the OVRSkeleton is the part of sdk, it will be better if Oculus fixes it in its Oculus Integration package.

View solution in original post

7 REPLIES 7

paperli
Honored Guest
I found a fix. Change below lines in OVRSkeleton.cs,
if (capsuleGO.activeSelf)
{
capsule.CapsuleRigidbody.MovePosition(bone.position);
capsule.CapsuleRigidbody.MovePosition(bone.rotation);
}
else
{
capsuleGO.SetActive(true);
capsule.CapsuleRigidbody.position = bone.position;
capsule.CapsuleRigidbody.rotation = bone.rotation;
}
to this:
if (capsuleGO.activeSelf)
{
capsule.CapsuleRigidbody.gameObject.transform.position = bone.position;
capsule.CapsuleRigidbody.gameObject.transform.rotation = bone.rotation;
}
else
{
capsuleGO.SetActive(true);
capsule.CapsuleRigidbody.gameObject.transform.position = bone.position;
capsule.CapsuleRigidbody.gameObject.transform.rotation = bone.rotation;
}
Looks like assigning position and rotation to the rigid body doesn’t work at all.
Since the OVRSkeleton is the part of sdk, it will be better if Oculus fixes it in its Oculus Integration package.

BFTV_Tech
Honored Guest
This fixes a similar problem I was having, thank you!!

In my situation I created a spaceship with a control touchscreen console for navigation.  Those buttons would then add a force to the spaceships rigidbody.  This was causing the capsule colliders on the skeleton to move off of the hand.  I've been trying to fix this for awhile.  Thanks again!!

raytsang1120
Explorer

paperli said:

I found a fix. Change below lines in OVRSkeleton.cs,
if (capsuleGO.activeSelf)
{
capsule.CapsuleRigidbody.MovePosition(bone.position);
capsule.CapsuleRigidbody.MovePosition(bone.rotation);
}
else
{
capsuleGO.SetActive(true);
capsule.CapsuleRigidbody.position = bone.position;
capsule.CapsuleRigidbody.rotation = bone.rotation;
}
to this:
if (capsuleGO.activeSelf)
{
capsule.CapsuleRigidbody.gameObject.transform.position = bone.position;
capsule.CapsuleRigidbody.gameObject.transform.rotation = bone.rotation;
}
else
{
capsuleGO.SetActive(true);
capsule.CapsuleRigidbody.gameObject.transform.position = bone.position;
capsule.CapsuleRigidbody.gameObject.transform.rotation = bone.rotation;
}
Looks like assigning position and rotation to the rigid body doesn’t work at all.
Since the OVRSkeleton is the part of sdk, it will be better if Oculus fixes it in its Oculus Integration package.


I have a better solution here, please feel free to try

if (capsuleGO.activeSelf)
{
capsuleGO.SetActive(false);         //Raymond Tsang debug @ 2020-02-14 
    capsuleGO.SetActive(true);          //Raymond Tsang debug @ 2020-02-14       
capsule.CapsuleRigidbody.MovePosition(bone.position);
capsule.CapsuleRigidbody.MovePosition(bone.rotation);
}
else
{
capsuleGO.SetActive(true);
capsule.CapsuleRigidbody.gameObject.transform.position = bone.position;
capsule.CapsuleRigidbody.gameObject.transform.rotation = bone.rotation;
}
  

raytsang1120
Explorer
I have a better solution, please feel free to try it

if (capsuleGO.activeSelf)
{
capsuleGO.SetActive(false);         //Raymond Tsang debug @ 2020-02-14
    capsuleGO.SetActive(true);          //Raymond Tsang debug @ 2020-02-14
capsule.CapsuleRigidbody.MovePosition(bone.position);
capsule.CapsuleRigidbody.MovePosition(bone.rotation);
}
else
{
capsuleGO.SetActive(true);
capsule.CapsuleRigidbody.gameObject.transform.position = bone.position;
capsule.CapsuleRigidbody.gameObject.transform.rotation = bone.rotation;
}

OMG you saved me countless hours of debugging, thank you!!!

Thanks a lot, this was a big help 😁

We're also exploring a built-in solution in case that helps anyone looking in the future: https://communityforums.atmeta.com/t5/Quest-Development/Hand-physics-Capsules-not-following-the-fing...