Oculus Rift Track where the left palm goes

Hello, I am trying to figure out a way to get the direction the left palm moves in. Here’s what I have basically:

When the left index trigger is pressed, you stamp the location.

if (OVRInput.Get(OVRInput.RawButton.LIndexTrigger) && !isLeftIndexPressed)
        {
            isLeftIndexPressed = true;
            Vector3 temp = leftHandAnchor.transform.TransformPoint(OVRInput.GetLocalControllerPosition(OVRInput.Controller.LTouch));
            leftIndexPressLocation = transform.InverseTransformPoint(temp);
        }
        else if (!OVRInput.Get(OVRInput.RawButton.LIndexTrigger))
        {
            isLeftIndexPressed = false;
        }

Then, while you’re holding the left trigger, you get the delta.

Vector3 temp = leftHandAnchor.transform.TransformPoint(OVRInput.GetLocalControllerPosition(OVRInput.Controller.LTouch));
        Vector3 CR = transform.InverseTransformPoint(temp);
        Vector3 LdeltaLocation = new Vector3(CR.x - leftIndexPressLocation.x, CR.y - leftIndexPressLocation.y, CR.z - leftIndexPressLocation.z);

However, I don’t exactly know how to tell which way the palm is facing while doing this. I basically want to move an object in this tracking space by the amount of LdeltaLocation in the direction the palm is facing.

Thanks in advance for the help :slight_smile:

Hello, So I was able to get the direction the palm is facing for any given hand by using:

Vector3 wSpaceDir = OVRTrackingSpace.transform.TransformDirection(LeftHandAnchor.transform.right);
controlClipDimsWithPalmDirection(wSpaceDir, true);

However, It seems to do the opposite of what I want it to do when I turn 180 degrees. It also acts weirdly when I turn 90 degrees in any direction. Any help is appreciated :slight_smile:

Thanks!