Skip to content

Use GrabAngle on v6.0 and above? #1302

Answered by MattGrayUL
MarMi4 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @MarMi4!

Have you tried using GrabStrength? It provides a value between 0 and 1 where 1 is fully grabbed and 0 is not grabbed at all, it may serve as easier to determine when the hand is grabbing.... (I would recommend using something like if(hand.GrabStrength > 0.8f) for a grab so it has a little cushion)

If not, here is a similar but not exactly the same method for calculating 'grab angle':

float CalculateGrabAngle(Hand hand)
{
    // Compute the sum of the angles between the fingertips and hands.
    // For every finger, the angle is the sumb of bend + pitch + bow.
    float angleSum = 0.0f;
    for (int finger_idx = 1; finger_idx < 5; finger_idx++)
    {

        angleSum += Mathf.…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@MarMi4
Comment options

Answer selected by MarMi4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants