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 agoHow are you updating the hand's positions? There's an event in OVRCameraRig called UpdatedAnchors. If you subscribe to that you will get a callback at exactly the same time that Oculus updates the position of the controllers in the tracking space. It shouldn't be possible for the hands to lag in that situation.
using UnityEngine;
public class HandTracker : MonoBehaviour
{
[SerializeField]
OVRCameraRig cameraRig;
[SerializeField]
Transform leftHandTransform;
[SerializeField]
Transform rightHandTransform;
void Start()
{
cameraRig.UpdatedAnchors += OnUpdatedAnchors;
}
private void OnDestroy()
{
cameraRig.UpdatedAnchors -= OnUpdatedAnchors;
}
private void OnUpdatedAnchors(OVRCameraRig rig)
{
leftHandTransform.SetPositionAndRotation(rig.leftHandAnchor.position, rig.leftHandAnchor.rotation);
rightHandTransform.SetPositionAndRotation(rig.rightHandAnchor.position, rig.rightHandAnchor.rotation);
}
}
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