Detecting and Switching Handedness
In our game, we're trying to detect and switch the handedness. I've found the basic information on the calls to get the information for which hand is set in the profile, but I can't find any more information on it. We're having an issue where I detect the handedness setting, and I can set the handedness (using the toolset OVRPlayerController) to the left hand by moving the "TrackedRemote" object to the right or left hand anchor. But, that's not working out. The switch doesn't seem to happen, even though it does in the editor (by manually setting the "lefthanded" bool.
I'm not really looking for code assistance as much as I'm looking for more information. Does anyone have a good resource for good info on how this works or an idea of what we've missed? I've spent several hours searching.
We're working on the Go, in Unity 2018.2, and using the code below:
I'm not really looking for code assistance as much as I'm looking for more information. Does anyone have a good resource for good info on how this works or an idea of what we've missed? I've spent several hours searching.
We're working on the Go, in Unity 2018.2, and using the code below:
private void OnApplicationFocus(bool focus) {
leftHanded = OVRInput.IsControllerConnected(OVRInput.Controller.LTrackedRemote);
SetHandedness(leftHanded);
}
public void SetHandedness(bool isLeftHanded) {
if(isLeftHanded) {
trackedRemoteRef.parent = leftHandAnchorRef;
} else {
trackedRemoteRef.parent = rightHandAnchorRef;
}
}
