- Home /
Realistic Hand Grapping
I've got a pretty nice human hand/arm model which I've written a script for to open and close the fingers/thumb in unison so that they resemble a closed fist (of sorts). I've used hard-coded constraints on the fingers so they don't contort into weird unnatural angles and so that they don't pass through the palm.
My end goal is to get the hand to grasp objects, but I'm having a real hard time doing it. I've attempted to give the fingers/thumb/palm box/capsule colliders along with rigidbodies, but whenever I try to 'pick up' a small cube, it will slide off the collider, or if the hand is moving too fast the cube will pass straight through it. I've played around with all the settings for the rigidbody and collider items, including changing the discrete/continuous/dynamic continuous collision detection. I've tried making the walls of the colliders thicker to compensate for fast movement. I've tried adding physic material to the objects, such as friction to the cubes I'm trying to pick up, to try and stop them from sliding off the hand. I've tried using mesh colliders, but have seen online that I shouldn't use them for dynamic/animated objects as the mesh uses a lot of resources to move with the object. I've also tried using raycasters to detect collision, as I've read online it's better for fast objects.
Basically what I want to do is to be able to close the fingers around an object, and if the object is small enough the fingers are to wrap around the object and for it to stay in the hand until I open to drop the object. The cubes currently sliding in the hand, flying off when I try to grasp them, or are passing through the hand. If I was able to make the hand 'solid' I think it would solve a lot of my issues, but that seems to be easier said than done as objects keep passing through it.
Any suggestions on how to tackle this issue would be great, thanks. I've attached a couple of images to show the hand model.
Image showing my attempt at using colliders to pick up objects.
Image showing my hand model's layout, along with the 'body' part, which I believe contains the bone information. The thumb is made up of three joints while the fingers have 4. The wrist is a single joint and there are two joints for the forearm (although the wrist/forearm aren't of interest right now).
It sounds like a rather special problem, but I could suggest looking into using a I$$anonymous$$ solution and maybe just make the held object a child of the hand bone ins$$anonymous$$d of relying on physics to keep it there. If the fingers open enough, you can always "unchild" it.
Thanks for your suggestion. I've got a couple of solutions for less-realistic picking up of items, such as what you're suggesting, but I'm really looking for some more 'life-like'. Currently I have a collision box that hovers below the palm and when an object is within that area and the hand closes it will pick up the item, but then the item isn't really being 'held', more just interacted with. I'm not sure if what I'm asking is possible, but thought I'd ask.
It's probably possible, but this is not likely to be the last problem you'll have with it. It sounds like you've already tried everything I would try, so all I can really offer is this:
How important is it that the grabbing be physics driven? If you want it to look more natural, why not parent the object to the hand, lerp it into position over a second or so, and dynamically animate the hand to close around the object properly without intersecting. That way you won't have to deal with the physics portion at all.
Typically (not always, but typically) it's easier to work with dynamic animations than force the physics engine to do a specific task. Physics tend not to play well with deter$$anonymous$$istic actions.
I have the same problem. I am also trying to grasp an object purely using physics but I am unable to... did you manage to find a solution?
Unfortunately I never got this working as intended, but my solution worked pretty well in the end. I posted it above in response to another user, but to reiterate: 'Currently I have a collision box that hovers below the palm and when an object is within that area and the hand closes it will pick up the item, but then the item isn't really being 'held', more just interacted with.' Hope this helps.
i remember for leap motion, when you grab an object, that object is actually stick to your fingers
Answer by theANMATOR2b · Aug 24, 2017 at 07:36 PM
Personally I would do this with animations and parenting the grasped objects instead. If you make one animation to close the hand it can close to a certain point if the object is large or small. Stop the animation from playing and parent the object to the wrist/palm bone at that time and the object will move with the hand.
The rotation of the wrist could be rigged up to manually control the blending of the wrist rotations by a blend tree.