Forum Discussion
SadraMoghadam
2 years agoHonored Guest
Controller-Driven Hand (Capsense) v66 is broken.
I have been trying to implement Capsense or controller-driven hands for four days, but I have not been successful. Initially, I worked with version 65 of the Meta XR SDK, but nothing seemed to work d...
SadraMoghadam
2 years agoHonored Guest
Thank you for the solution. I have previously tried using OVRControllerHands on version 65, and now on version 66, but encountered a different problem. When I move the player, the hands remain stationary in one position. For example, if I move the player to position (-8, 0, 0), the hands will appear at position (8, 0, 0). Do you know the reason for this issue and how I can fix it? I have tried almost everything to resolve this problem but couldn't identify the source.
ryan-at-melcher
2 years agoProtege
I fixed what I believe is the same issue you are seeing SadraMoghadam: The synthetic hands in the OVRControllerHands prefab are positioned using a local-space pose which does not account for the camera rig moving or rotating. This means the hands will "remain stationary" rather than follow the player as expected.
My fix was to make a copy of the HandVisual script, change it's UpdateSkeleton function to use a world-space pose, and use this script in place of the original component.
// WorldSpaceHandVisual.cs
// Add a serialized field to reference OVRInteraction's transformer.
[SerializeField]
private TrackingToWorldTransformerOVR _trackingToWorldTransformer = null;
public void UpdateSkeleton()
{
// ...
if (_updateRootPose)
{
if (_root != null && Hand.GetRootPose(out Pose handRootPose))
{
// Original OVR code. This incorrectly uses the local-space pose
// to position the hands. The result is the synthetic hands do not
// follow the player's actual controller position as the player
// moves and rotates.
//_root.position = handRootPose.position;
//_root.rotation = handRootPose.rotation;
// Fixed code. This transforms the local-space pose to world-
// space before assigning it to the hands.
Pose worldPose =
_trackingToWorldTransformer.ToWorldPose(handRootPose);
_root.SetPositionAndRotation(
worldPose.position,
worldPose.rotation
);
}
}
// ...
}This solution also required I duplicate the HandVisualEditor script and set it up for the new WorldSpaceHandVisual. (This fix would've been a lot simpler had Oculus made the access level of members in their scripts protected by default!)
Here's a gist of my fixed files: https://gist.github.com/ryan-at-melcher/773d3073329134c43a60110e101f0557
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 2 years ago
- 2 years ago
- 3 months ago
- 4 months ago