Forum Discussion
DemonGamesLab
6 years agoProtege
Oculus Custom Hands - Stutter
I am trying to implement custom hands, for some reason it stutters / lags. I set the frame time to 90fps which helps a bit but still way too laggy. I have searched online for a long time and can not ...
Anonymous
6 years agoOkay. I just tried out the CustomHands scene in the Sample Framework and I see the stutter that you're talking about. I feel bad saying this in the Oculus forum, but so much of the code in the Sample Framework is broken and out of date.
In OVRGrabber.cs try changing the Awake() function by adding the three lines below:
In OVRGrabber.cs try changing the Awake() function by adding the three lines below:
// Add this
if (rig == null)
{
rig = OVRManager.instance.GetComponent<OVRCameraRig>();
}
// End add this
The finished function should look something like this (I added some Debug.Log messages so you can see if there are problems):
protected virtual void Awake()
{
m_anchorOffsetPosition = transform.localPosition;
m_anchorOffsetRotation = transform.localRotation;
// If we are being used with an OVRCameraRig, let it drive input updates, which may come from Update or FixedUpdate.
// FIXME: HEY OCULUS THIS IS A DUMB AND HACKY WAY TO FIND THE OVRCameraRig!!!!!!!
OVRCameraRig rig = null;
if (transform.parent != null && transform.parent.parent != null)
rig = transform.parent.parent.GetComponent<OVRCameraRig>();
// Add this
if (rig == null)
{
Debug.Log("Trying one last time to find the OVRCameraRig.");
rig = OVRManager.instance.GetComponent<OVRCameraRig>();
}
// End add this
if (rig != null)
{
Debug.Log("Success! Found the OVRCameraRig");
rig.UpdatedAnchors += (r) => { OnUpdatedAnchors(); };
operatingWithoutOVRCameraRig = false;
}
else
{
Debug.LogWarning("Couldn't find the OVRCameraRig. There will be hand jitter.");
}
}
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
- 6 years ago
- 5 months ago