ValveSoftware / steamvr_unity_plugin

SteamVR Unity Plugin - Documentation at: https://valvesoftware.github.io/steamvr_unity_plugin/
BSD 3-Clause "New" or "Revised" License
1.03k stars 255 forks source link

Changing the default hand gesture to "pointing" #248

Closed ceberman closed 5 years ago

ceberman commented 5 years ago

Hi, I'm working on simplifying my interface where the primary interaction for regular hand controllers (not knuckles or LeapMotion) would be to have the index finger point, with just the hand model visible and no controller. (using SteamVR 2.1.5b)

I can achieve this gesture when I use SteamVR_Behaviour_Skeleton.RangeOfMotion = WithoutController , controller.SetActive(false) and manually hit the GrabGrip buttons (on Vive) ...but i don't see it anyplace that is easily accessible, including in the hand animators (vr_glove_graspPoses)

Is there a way to do this either programmatically or in the binding UI?

zite commented 5 years ago

This is a feature in active development. If you're feeling adventurous you can download the latest 2.2b1 beta and check out the SteamVR_Skeleton_Poser component. Add it to a gameobject and it'll let you configure a hand pose. Then you can tell a SteamVR_Behaviour_Skeleton component to blend to that pose.

Alternatively you can create a normal unity animation of a pose and blend to that. The linear drive has an example of this I believe.

LexQzim commented 5 years ago

This is a feature in active development. If you're feeling adventurous you can download the latest 2.2b1 beta and check out the SteamVR_Skeleton_Poser component. Add it to a gameobject and it'll let you configure a hand pose. Then you can tell a SteamVR_Behaviour_Skeleton component to blend to that pose.

Alternatively you can create a normal unity animation of a pose and blend to that. The linear drive has an example of this I believe.

I tried it with the SteamVR_Skeleton_Poser component, but I only can chose between a fist, an open hand and the grip pose. Also I can only select the two options (Static and Free) in the enum movement and it doesn't help me after all.

Isn't possible to create a scriptable object or something like that, where I can define my own poses like in here youtubeVideo.

I will take a look into the linear drive example, but actual it is not so obviously to create his own pose. Hope you can help.

sincerly

edit: And why does the "hand.skeleton.skeletonAction.indexCurl" has no setter? I unterstand this var that I can curl the different fingers and define a pose with this but I cannot set this var. Do I use the wrong input?

zite commented 5 years ago

This functionality has been integrated into the current version of the plugin using SteamVR_Skeleton_Poser. You can check out the documentation for it here: https://valvesoftware.github.io/steamvr_unity_plugin/articles/Skeleton-Poser.html

and a tutorial here: https://valvesoftware.github.io/steamvr_unity_plugin/tutorials/Skeleton-Poser.html

martamartino86 commented 5 years ago

Sorry to revive this post, but my issue is strictly related.

I added SteamVR_Skeleton_Poses component directly inside both LeftHand and RightHand objects, in order to have my poses also when the user does not interact with a specific object (i.e. clicks trigger). When the game starts, I call BlendToPoser(myPoser) in order to "impose" it on hands' default animations. So, for example when I press the trigger, the hands move with my pose and not with the default one (fist animation).

Then I added an Interactable obj into the scene. I noticed that inside OnDetachedFromHand function of Interactable obj the hand is blended back to skeleton, but of course I would like to come back to my personalized poser. I tried to use BlendToPoser(myPoser) again when the action is finished (simultaneously with BlendToSkeleton...) but of course it's not a safe solution and it's not even working properly.

What am I missing? Do I need to develop a "poses handler" in order to make it work?