I have a problem implementing Oculus Touch in my project. For some reason my hand models jitter and go into double vision when they move, very much like low framerate jitter. The problem is that my framerate is steady at over 95fps and no other part of the game has jitter.
Any ideas? It’s as if the hand models are displaying at half the framerate of the rest of the game!
To expand on this a little, I am using custom hand models which I have made the children of the left and right hand anchors. I have just run a test with the Oculs sample scene for touch and can see that the default avatar hands move perfectly smoothly… however if I attach a game object as a child of the hand anchor (just a simple cude) it too judders like crazy.
So the problem seems to be that you shouldn’t have a hand mesh as the child of the hand anchors without it jittering… so what is the correct way to do it?
This literally created more questions for me than it answered.
I can’t find any reference in the OVRManager script for the controller positions / rotations.
the OVRInput script has GetLocalControllerPosition() and GetLocalControllerRotation()
but I don’t know how to differentiate between left and right controllers.
I think it should be something like
rightHand.transform.position = OVRInput.GetLocalControllerPosition(RTouch);
rightHand.transform.rotation = OVRInput.GetLocalControllerRotation(RTouch);
But the RTouch part is wrong. I don’t know how to tell it that I want the Right Touch information.
Here is the code that its trying to call from the OVRInput script for position:
public static Vector3 GetLocalControllerPosition(OVRInput.Controller controllerType)
{
switch (controllerType)
{
case Controller.LTouch:
case Controller.LTrackedRemote:
return OVRPlugin.GetNodePose(OVRPlugin.Node.HandLeft, stepType).ToOVRPose().position;
case Controller.RTouch:
case Controller.RTrackedRemote:
return OVRPlugin.GetNodePose(OVRPlugin.Node.HandRight, stepType).ToOVRPose().position;
default:
return Vector3.zero;
}
}
OK through sheer brute force, guesswork, trial and error, and banging rocks together I managed to get it working.
make your rightHand object and OVRCameraRig objects both children of an empty “player” object.
Then paste this code into your games input controller script, where rightHand is whatever you want controlled by your right hand touch controller.
For anyone interested I’ve also detailed a step-by-step method which worked for me, at getting rid of the jittering/stuttering hands issue. You can check out the video for this below
I have an issue where my hands are tracking fine but whenever I pick up and object and hold it and move then I get extreme jitter and it appears the raycast is pushing the object I am holding away from me. Is this a a layer interaction issue with the ground or with the frame rate not being able to keep up with the render upon moving in realtime? I’m really struggling here.