Building a Hand Poser for Unity XR

Поділитися
Вставка
  • Опубліковано 11 вер 2024
  • Hello and welcome! Today we're going to be going over the hand poser I've created for Unity's XR Toolkit. We'll be doing an overview of the project, as well as doing a bit of coding for the poser used during gamplay. And to do this, we'll be using Unity 2019.4 and Unity's XR Toolkit 0.10.
    GitHub:
    github.com/C-T...
    Support my work, and get access to source code!
    / vrwithandrew

КОМЕНТАРІ • 116

  • @juanong4709
    @juanong4709 2 роки тому +3

    This is awesome! Super helpful and it provides a much better experience than simply not showing the hand when selecting an object. I messed around with this and was able to make the hands respond to physics too, so now I feel like I have the perfect hand setup thanks to you.

    • @VRwithAndrew
      @VRwithAndrew  2 роки тому +1

      Glad you got some use out of it, Juan!

  • @conraddugger4165
    @conraddugger4165 3 роки тому +8

    You always predict the next features I plan for my project. SO glad you tackled this, thank you!

    • @VRwithAndrew
      @VRwithAndrew  3 роки тому

      You're quite welcome, hopefully you find it useful!

  • @differentreality449
    @differentreality449 3 роки тому +1

    woah this is exactly what ive been looking for! thank you so much

  • @picoplanetdev
    @picoplanetdev 3 роки тому +2

    Looks great Andrew!

  • @daddylonglegs9176
    @daddylonglegs9176 3 роки тому +1

    BEAUTIFUL. Thank you! this is exactly what I'm looking for. I hope it works!

    • @VRwithAndrew
      @VRwithAndrew  3 роки тому

      Let's hope! I haven't checked on it recently and is probably do for some XR Toolkit updates.

  • @yusufalibrahim1994
    @yusufalibrahim1994 3 роки тому +1

    Nice Tutorial Andrew, thanks! Maybe a part 2 tutorial to explain how to have multiple poses for 1 object depending on where it was grabbed?

    • @VRwithAndrew
      @VRwithAndrew  3 роки тому +1

      Yeah! That's something that should be possible with XR Toolkit.

  • @insaneduane
    @insaneduane 3 роки тому

    I just finished the hand animation tutorial and was wondering how to pose the hands..... Thanks again!

  • @swancollective
    @swancollective 3 роки тому +5

    Dear Andrew, thanks again for your incredible skills and for writing this amazing tool!
    Just a question: Your custom poses work perfectly, but only if I grab the objects. My hands don't do a grabbing animation when I hit the trigger and there's no object. They remain still, while before they were moving like the regular Quest hands.
    Is there something I can do to get this standard behavior back?

    • @VRwithAndrew
      @VRwithAndrew  3 роки тому

      Can explain that a bit more? Is this for like static interactables?

    • @swancollective
      @swancollective 3 роки тому

      @@VRwithAndrew thanks for your quick reply! I just mean the very basic and common functionality, that the hands make a gripping motion whenever the trigger is pressed, independent of any objects in the space.
      Like the standard oculus hand models.

    • @VRwithAndrew
      @VRwithAndrew  3 роки тому +1

      @@swancollective Ohhh, gotcha! Yeah, I have another series on how to map the inputs to a hand model as well. I believe it's just called XR Hands. At some point, I'm hoping to be able to combine everything + IK Arms or similar.

    • @swancollective
      @swancollective 3 роки тому +1

      @@VRwithAndrew Yes, my current hands are the result of your incredible tutorial "Custom Hands for Unity's XR Toolkit". Those are animating perfectly, but they won't work with custom poses, right?
      Is it currently possible to combine animated hands with custom poses, i.e. this tutorial with your custom hand tutorial?
      Basically, I like to attach your "HandAnimator" script to the custom-pose-hands of this video. Any help highly appreciated!

    • @VRwithAndrew
      @VRwithAndrew  3 роки тому +1

      @@swancollective Yeah, that's possible! It certainly takes a bit of know-how to set up the same asset working for both. You'll primarily need to write logic that prevents the HandAnimator from doing anything while there is an active Pose occuring.

  • @Homsin
    @Homsin 3 роки тому

    Thanks for doing this and making it public

  • @hammedarowosegbe5708
    @hammedarowosegbe5708 3 роки тому

    This is fantastic! I'm sure it's going to be a feature unity will be adding soon. But for now this rocks!

    • @VRwithAndrew
      @VRwithAndrew  3 роки тому

      Thanks, Hammed!

    • @DavidZobristGames
      @DavidZobristGames 3 роки тому

      unity should just take over this solution, its perfect

    • @Shiffo
      @Shiffo 2 місяці тому

      They never did this right?

  • @JustinPBarnett
    @JustinPBarnett 3 роки тому

    Do you need a specific plugin to add 'Pose Container (script)' to your project? It's not showing up for me.

    • @VRwithAndrew
      @VRwithAndrew  3 роки тому +1

      No, it should've been in the Github project and it's not there for whatever reason. Which, I'll fix that today! It's a really simple script, so you can go ahead and make a script of the same name.

    • @JustinPBarnett
      @JustinPBarnett 3 роки тому

      @@VRwithAndrew Oh awesome! thanks so much!

  • @drewharvey
    @drewharvey 3 роки тому

    this is dope i'll probably use this later

  • @NatureRaph
    @NatureRaph 2 роки тому +1

    Hello thanks for this nice Video. But i have Problems. Can you help me please. If I Grab my own model the Rotation works but the Model is far away from the Hand and the attachments to change doesnt help. And the next question is can i change the Model of the Hand because now it doesnt work.

  • @brianfromearthhh
    @brianfromearthhh 3 роки тому +1

    this is developer gold lol thank you so much

  • @yudanaim6849
    @yudanaim6849 3 роки тому +1

    Cool love it. Amazing explanation

    • @VRwithAndrew
      @VRwithAndrew  3 роки тому +1

      I hope you found it useful. :)

    • @yudanaim6849
      @yudanaim6849 3 роки тому

      @@VRwithAndrew yep can you add a video about implementing AR like that?

    • @VRwithAndrew
      @VRwithAndrew  3 роки тому +1

      @@yudanaim6849 You know, I may look into doing some AR stuff this year. I haven't done it in a while, so I'd have to learn a bit.

    • @yudanaim6849
      @yudanaim6849 3 роки тому

      @@VRwithAndrew because of covid19 people afraid putting helmets that passed hands. But AR is with their own devices

  • @bobjrgeorge4577
    @bobjrgeorge4577 Рік тому

    I know it’s been awhile but is this available for a commercial game or do you own it? Either way this looks cool don’t know how xr has not made this yet

    • @VRwithAndrew
      @VRwithAndrew  Рік тому +1

      It's technically since I made it. But, it's more/less available for whoever wants to use it for their project.

  • @HunterProduction
    @HunterProduction 2 роки тому

    Hi dude, thank you so much for helping me with this Pose Provider tool! I'm trying to implement it in my physics based VR app. A question, is there a way to organize the object hierarchy and components to get more than 1 Pose for a single object?
    I'm in, is there a correct way to organize the hierarchy in order to have multiple pose providers for a single object, and apply a pose depending on the area/part of the object you grab?

    • @VRwithAndrew
      @VRwithAndrew  2 роки тому +1

      It's possible! But, I'm not sure if there's an elegant way of doing it. I've seen a lot of people use multiple pose points, then do a distance check when the object is selected to find which pose/attach they should use.
      I know XR Toolkit is considering dynamic attach points for grabbing, so that may be something in the future that makes it nicer.

  • @guevara4400
    @guevara4400 Рік тому

    I am trying to use this tool for the Unity 3D 2021.3.19 release but unfortunately it does not work.

  • @lucasmartinic2039
    @lucasmartinic2039 3 роки тому

    Amazing Andrew, thank you so much!

  • @fischeey19
    @fischeey19 2 роки тому

    hey, i recently updated everything i could and when i imported your files into my scene i got an error in the gameplay hand script about the "interactable" on lines 27 and 36 being depreciated and "interactable object" being the new version, i did this but when i switched i got another error reading as follows:
    error CS1061: 'IXRSelectInteractable' does not contain a definition for 'TryGetComponent' and no accessible extension method 'TryGetComponent' accepting a first argument of type 'IXRSelectInteractable' could be found (are you missing a using directive or an assembly reference?)
    i have no idea what to do about this, could use some help

  • @Lukeibol
    @Lukeibol 2 роки тому

    Hello, it is possible to behave the opposite way intended? like when I want to use a handle for example, I don't want the handle to come to my hand, but my hand to go to the handle, I'm messing with the scripts but couldn't not get to work :/

    • @VRwithAndrew
      @VRwithAndrew  2 роки тому

      Not in its current state, I only have it to work with grabbable objects. It would need some additional functionality to move the hand to the interactable instead.

  • @saravanasaravana-cz5gl
    @saravanasaravana-cz5gl 3 роки тому +1

    wonderful bro

  • @wolfeatsheep163
    @wolfeatsheep163 3 роки тому

    This is amazing and you're doing an awesome job I'm just starting off and am a little familiar with unity and c# also I'm running a Odyssey wmr headset and was wondering where I should start in your headset ( I also own an old vive fyi though it's not set up )

    • @VRwithAndrew
      @VRwithAndrew  3 роки тому

      If you already have the WMR stuff either headset is most likely fine. I'm not sure when it comes to input though. I don't have much experience with WMR headsets.

  • @noahmalchy2676
    @noahmalchy2676 3 роки тому +3

    Hey Andrew, I have a question that I'd appreciate your insight on, I want to do VR dev with Unity, I bought my Quest 2, I can run my scene build and throw a sphere lol, but when it comes to semi-advanced stuff like making hand prefab fingers move, it's pretty tough to wrap my head around how to actually script this in Unity and effect the actions/effects I want to emulate, to add to things it seems like the Unity VR ecosystem is changing so quickly, like you mentioned at the start of this video you're using "device-based" XR rig, not action-based, but I believe action-based is Unity's intended input system for VR going forward, so I want to do this doing that obviously, but I can't even discern what you're doing here that is "device-based" here, to get to my question, if you were in my shoes (new to Unity and VR but not programming (I am a full-stack web dev w/ knowledge of C#)), how would you approach learning Unity + XR development at this moment in time? It seems like every course is outdated (even on Unity Learn), documentation isn't being updated or is vague, dev environment set-up is constantly changing, do you think it might be better to just learn how to create traditional Unity games and then wait for the VR ecosystem to mature? Or is the nature of VR dev so different it's best to just learn Unity and VR at the same time and tough it out, are there any really good courses on fundamentals you think aren't outdated? Thanks for reading and keep up the awesome videos

    • @VRwithAndrew
      @VRwithAndrew  3 роки тому

      It's best to learn the basics of Unity before getting into VR. There's just a lot of additional engine knowledge that's assumed you know already.
      XR Development is getting close to a point that it shouldn't be changing all that much for a while. XR Toolkit will most likely hit 1.0, and Unity will most likely be releasing an updated Unity Learn course.
      Also, note that the majority of what you're seeing here is still technically in Preview. But, even in its current state the amount of functionality you get is much better than what it was previously.

    • @TheGamerzXChannel
      @TheGamerzXChannel 2 роки тому

      @@VRwithAndrew Hello Andrew great video! One year is around, can you give an updated answer to what you have responded one year ago? I am with Unity since 5.6 and decided to go into VR. Any suggestions to save precious time?

    • @VRwithAndrew
      @VRwithAndrew  2 роки тому

      @@TheGamerzXChannel Pretty much still valid, I would just recommend using Unity 2020.

  • @constantinpolayev7875
    @constantinpolayev7875 2 роки тому

    Hey. Just downloaded github files. I followed all steps of setup VR hands on this video. But, when testing in VR, hand pose does not working. What I need to do extra to make pose working in VR?I am complete beginner and want to learn VR development. Thanx

  • @stefanocambazzu7146
    @stefanocambazzu7146 2 роки тому

    Can you make a video for oculus driver configuration?
    I can't get the x y buttons to work.
    How can I let the viewer know that the viewer is on the table and pause the game?
    thank you

  • @nikpo973
    @nikpo973 3 роки тому +1

    Why are the hand models missing the "Target Interactor" field?

    • @VRwithAndrew
      @VRwithAndrew  3 роки тому

      Is it not showing in the Inspector? Either make sure that the variable is Public, or if it's Private use the [SerializeField] markup as well.

  • @HaniSharif
    @HaniSharif 3 роки тому

    Thank u so much. Just a quick question. U already had a video on moving hands using velocity. I wonder if that video and this video can be combined? Could u please differentiate the two. Sort of confused. Thanks again.

    • @VRwithAndrew
      @VRwithAndrew  3 роки тому +1

      This is just for showing the hand in different states/animation when holding objects. The hand velocity is actually for how the hand itself moves to follow the controller. They can most likely be combined, but that's probably a whole thing that I'd need to do on my own before describing how to do it.

    • @HaniSharif
      @HaniSharif 3 роки тому

      VR with Andrew got it. Thank u so much for replying 🔥

  • @antoineprovost7947
    @antoineprovost7947 2 роки тому

    Hi Andrew ! Thanks for this amazing tutorial and script, it work perfectly !
    I'm currently designing a VR game and that would be amazing if the hands can move along with velocity tracked objects. I know it's been more than a year but is there a easy solution to maybe attach the hand pose as a child of the grabbed object instead of the hand prefabs ?
    Thanks again for this amazing content !

    • @VRwithAndrew
      @VRwithAndrew  2 роки тому

      Unfortunately, I don't have a solution off the top of my head. It's something that I'm looking at now.

    • @antoineprovost7947
      @antoineprovost7947 2 роки тому

      @@VRwithAndrew Amazing ! Maybe a next tutorial on the channel ? :D
      If you find something, I'm interested to know what you came to !

  • @landonzx1
    @landonzx1 3 роки тому

    Hey is there anyway to use the hand poser but also having a distance grabbing like thing, like boneworks?

    • @VRwithAndrew
      @VRwithAndrew  3 роки тому

      In theory! Since it hooks into the selected events, it should work just as well for the ray interactor.

  • @CDerek9
    @CDerek9 Рік тому

    I remember, I used to plan for a future game and how a grabbing system would work, so on pickup, the point would go to the hand, and the hand would pose into a fist and when the finger hit something it would stop. So no matter what you grab you wouldn't have to make individual animations. Now that I am actually a game developer, I have an idea on how I could code that. However my PC is broken. But I can still collect information while I wait.

  • @TedThomasTT
    @TedThomasTT 3 роки тому

    Great stuff

  • @daveknoc5380
    @daveknoc5380 3 роки тому

    Hi Andrew thanks for the tutorial. i see the hand and object always lines up when pose is created but i noticed that the offset from controller to hand needs to be different for different controller manufacturers. do you know if there is a list of offsets/angles so all controllers always lineup. its especialy noticable when holding a gun , oculus, vive, index etc all hold the gun offest and angled in different ways.

    • @VRwithAndrew
      @VRwithAndrew  3 роки тому

      This is correct, the biggest difference is between Oculus and non-Oculus controllers. Unfortunately, there isn't a common resource at the moment that defines these differences.

  • @nicolasportu
    @nicolasportu 2 роки тому

    Hey! Is it possible to use this Plugin in a Full body humanoid? Thanks

    • @VRwithAndrew
      @VRwithAndrew  2 роки тому +1

      Potentially, I've never done it. But, I imagine once you get the joints setup it may work.

  • @sailormoonlogin5230
    @sailormoonlogin5230 3 роки тому

    Not working for me, there is no Pose Container component that can be added to the 3d object, any ideas?

    • @VRwithAndrew
      @VRwithAndrew  3 роки тому

      You either don't have the entire project or if you're using an existing project didn't copy over all of the files.
      You can see here that's in included in the template on Github,
      github.com/C-Through/XR-HandPoser/blob/main/Assets/_HandPoser/Scripts/Pose/PoseContainer.cs

  • @MrJordenjoris
    @MrJordenjoris 3 роки тому

    Worked great! The only problem I have is with imported models. When I import a model it will do the preview hands based on the transform location and when I grab it, it will do it relative to the pivot point of the object (on a gun the grip). Because of this it is difficult to get the correct position. Do you maybe know a way to fix this?
    Google says to put the prefab in an empty game object, but the pivot will then not change

    • @VRwithAndrew
      @VRwithAndrew  3 роки тому +1

      I can't recall exactly, it's been a while. You may want to actually want to change the code in ApplyOffset within the GameplayHand. For the RotateAroundPivot, you can try changing that to transform.position.

  • @nikitatim5379
    @nikitatim5379 3 роки тому

    Why, when the "XRGrab" component has the "kinematic" parameter, does the object in the hand begin to go beyond its limits when moving?

    • @VRwithAndrew
      @VRwithAndrew  3 роки тому

      That's more/less how physics movement is applied. It kinda lags behind by a frame.

    • @nikitatim5379
      @nikitatim5379 3 роки тому

      @@VRwithAndrew how can this be fixed? Do I need to change the "xrgrab"code?

    • @VRwithAndrew
      @VRwithAndrew  3 роки тому

      @@nikitatim5379 I believe I mention this in the video. But, it's why I use the Instantaneous tracking mode. You'd most likely need to change how the project handles hands. I'm not sure exactly how I would do it.

  • @bezlinn
    @bezlinn 3 роки тому +1

    nice!

  • @silascontaifervcu
    @silascontaifervcu 3 роки тому

    Would it be to hard to use this Hand Poser in the OpenXR? (I have a HP Reverb)

    • @VRwithAndrew
      @VRwithAndrew  3 роки тому +1

      I don't think so! I'm hoping to revisit the project again soon to implement it into one of my larger projects.

  • @xploaded143
    @xploaded143 3 роки тому

    Thank you very much for this tutorial! I would love to use this in our uni project but it seems the onSlectEntered function is deprecated in the new toolkit version.
    It says to use selectEntered instead, but I cant figure out how to use it instead. Do you know a quick workaround for this?

    • @VRwithAndrew
      @VRwithAndrew  3 роки тому +1

      The newer functions use Event Arguments rather than single interactable or interactors. I cover this in my Bow and Arrow update video.
      ua-cam.com/video/H0xTz4JtWiI/v-deo.html

    • @xploaded143
      @xploaded143 3 роки тому

      @@VRwithAndrew Thank you very much for the tip! I am still quite new to unity vr and the xr toolkit.
      So I basically tried (from 11:04):
      private void OnEnable()
      {
      // Subscribe to selected events
      targetInteractor.selectEntered.AddListener(TryApplyObjectPose);
      targetInteractor.selectEntered.AddListener(TryApplyDefaultPose);
      }
      private void OnDisable()
      {
      // Unsubscribe to selected events
      targetInteractor.selectEntered.RemoveListener(TryApplyObjectPose);
      targetInteractor.selectEntered.RemoveListener(TryApplyDefaultPose);
      }
      private void TryApplyObjectPose(SelectEnterEventArgs args)
      {
      // Try and get pose container, and apply
      if (args.interactor.TryGetComponent(out PoseContainer poseContainer))
      ApplyPose(poseContainer.pose);
      }
      private void TryApplyDefaultPose(SelectEnterEventArgs args)
      {
      // Try and get pose container, and apply
      if (args.interactor.TryGetComponent(out PoseContainer poseContainer))
      ApplyDefaultPose();
      }
      ** also tried args.interactable.TryGet... (still no working as intended, now the objects just snap to the wrist smh)
      ... but that didn't work. Maybe I still missed something or just dont quite understand whats going on. Help MUCH appreciated! :)

    • @VRwithAndrew
      @VRwithAndrew  3 роки тому +1

      @@xploaded143 If the poses are being applied, that means the events are working. If the object is not the correct place. You'll need to set the attach point of the Direct Interactor with the point from the hand.

    • @xploaded143
      @xploaded143 3 роки тому

      @@VRwithAndrew I managed to get it working, sort of :) ... the only issue I faced is that the object for the Pose Container has to be Scale 1,1,1 inside the prefab or otherwise the object will float besides/below/under the posing hand. Managed to work around this issue by only using properly scaled assets in our uni project. Don't know if its a general issue or maybe I messed something up. But really cool stuff, thank you very much for your videos (even though they get outdated quickly with all these new releases). Definitely will stick around!

    • @VRwithAndrew
      @VRwithAndrew  3 роки тому

      @@xploaded143 You're welcome! I'll most likely be revisiting this project in the future to update it for XR Toolkit's events, and inputs.

  • @ajontop6460
    @ajontop6460 3 роки тому

    Don't know what happened but when I installed the project it completely annihilated vr compatibility with every unity project, even when I made new ones, uninstalled and installed unity 2019, and even after uninstalling the project

    • @VRwithAndrew
      @VRwithAndrew  3 роки тому +1

      That's not exactly something a project can do. Your Unity or other software may have updated.

  • @andyjay2718
    @andyjay2718 2 роки тому

    I can't seem to find the pose container script, and i do have the XR Interation Toolkit installed
    Can someone help me? ")

    • @VRwithAndrew
      @VRwithAndrew  2 роки тому

      It's a custom script, you can find the project at the Github link in the description.

  • @awsumturtle
    @awsumturtle 3 роки тому

    Is there something I missed because for me the hand just grabs it weirdly and on the left hand it just goes through the wrist?

    • @VRwithAndrew
      @VRwithAndrew  3 роки тому

      Yeah, that doesn't sound correct.

    • @awsumturtle
      @awsumturtle 3 роки тому

      @@VRwithAndrew Ooh yeah i know😂

    • @awsumturtle
      @awsumturtle 3 роки тому

      @@VRwithAndrew I dont know what is wrong though..

    • @ciel1189
      @ciel1189 3 роки тому

      @@awsumturtle You haven't setup the gameplay hand script at the end of the video. If you write what's in it, it will work.

    • @awsumturtle
      @awsumturtle 3 роки тому

      @@ciel1189 Oh, I thought it was already written. I'll try it out. Thanks!

  • @pandat1070
    @pandat1070 3 роки тому

    I am new to game development in Unity and am very inexperienced, can anyone tell me which files to copy over if i want to incorporate this to a preexisting project?

    • @VRwithAndrew
      @VRwithAndrew  3 роки тому

      There are a couple different ways, first I'd make sure you have all of the necessary packages installed. Then, you can copy over the HandPoser folder into the other project, or look into creating a Unity Package where it bundles everything up for you.

  • @Sija_Men
    @Sija_Men 3 роки тому

    Why i dont Have target Interactor on GameplayHand?

    • @VRwithAndrew
      @VRwithAndrew  3 роки тому

      What version of XR Toolkit are you using?

    • @Sija_Men
      @Sija_Men 3 роки тому

      @@VRwithAndrew Interaction toolkit? 0.10.0

    • @VRwithAndrew
      @VRwithAndrew  3 роки тому

      @@Sija_Men It should show then, just make sure it's marked as Public.

  • @immortalhamster1645
    @immortalhamster1645 3 роки тому

    Auto hands has left the chat