Тёмный

Mastering VR Hand Animation: Step by Step 

Подписаться
Просмотров 110 тыс.
% 3 383

What's the best way to animate VR hands using Unity's XR plugin and the new input system? Find out in this video!
Hey guys! If you're like me at all, my hands are the first things I look at when starting a VR game. The model and animations are core to the immersion I feel. They really connect me to the game, you know? So I figured it's the next step in learning VR in Unity: Animating Hands. If you've always wanted to learn how to do the perfect animation to connect your player to the game, here is the perfect video for you!
🖐 Download the Hand Models: www.patreon.com/posts/free-oculus-vr-46544401
📂 Download the Project: vrcreators.b-cdn.net/Source%20Code%20Downloads/JPB_AnimateHands.zip
📺 Watch Next: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-oqXBY51KP5A.html
🥽 Join the VR Creator Club: skool.com/vrcreatorclub
⌚ Timestamps
0:00 Intro
0:24 Setting up the project
1:06 Importing the FREE Oculus hand models
5:51 Creating an animation
9:15 Setting up the animation controller
14:23 Coding the controller inputs
23:08 Troubleshooting
24:10 Hiding the hand when grabbing
27:11 What game should I make next?
27:36 Subscribe!
#vr #animation #unity

Опубликовано:

 

26 янв 2021

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 804   
@shayaltshue1791
@shayaltshue1791 3 года назад
Honestly I don't know how I could've got started into VR development without these amazing tutorials. Thank you Justin, keep up the awesome work!
@JustinPBarnett
@JustinPBarnett 2 года назад
Aw thanks so much!
@acathosh
@acathosh 2 года назад
Pro-tip: If you are using oculus you can calibrate your hands while in the link-menu. That will give you a transparent view of your unity hands over your oculus hands and you can make them align perfectly. My coordinates were x:0.0104 y:-0.0036 z:-0.0435 for the left hand
@JustinPBarnett
@JustinPBarnett 2 года назад
Ooo good tip!
@ethandogyo7298
@ethandogyo7298 2 года назад
Where is the link menu? If its in the air link menu where is it at in there?
@aidentheonion
@aidentheonion 2 года назад
@@ethandogyo7298 just press the oculus button and it will open up the menu
@raphael3024
@raphael3024 Год назад
You a god
@willnmari5998
@willnmari5998 3 года назад
Wow that "ctrl + ." trick for generating methods and variables is amazing! thanks! great tutorial!
@JustinPBarnett
@JustinPBarnett 3 года назад
Glad you liked it!
@sharpenedaxe2
@sharpenedaxe2 3 года назад
This channel is going to blow up, I can feel it!
@JustinPBarnett
@JustinPBarnett 3 года назад
I'll always remember you were here at the beginning!!
@sharpenedaxe2
@sharpenedaxe2 3 года назад
@@JustinPBarnett :D
@tonypitman5648
@tonypitman5648 3 года назад
Sometimes RU-vids comment system isn't easy to follow. I can't find the comment chain we had where you told me how to make the hand "flat". I finally got that working and wanted to thank you. It worked well. Now I just need to figure out a good way to add my thumb only functionality without having to modify the stock file, but also without having to recreate a whole class of my own.
@JustinPBarnett
@JustinPBarnett 3 года назад
That thread is on the private video I believe!
@logan06_drives24
@logan06_drives24 2 года назад
lets take a moment to respect this man for responding to comments
@JustinPBarnett
@JustinPBarnett 2 года назад
Every. Single. One.
@KipppJ
@KipppJ 3 года назад
This might be the only clean tutorial right now using the new Action system, amazing!
@JustinPBarnett
@JustinPBarnett 3 года назад
Glad you think so!
@Zadhompl
@Zadhompl 3 года назад
I'm a dude who decided to create a vr game for his IT engineering thesis and you're a god save for me.
@JustinPBarnett
@JustinPBarnett 3 года назад
Best of luck to ya! Let me know if I can help you out with anything!
@jack8750
@jack8750 3 года назад
I \*really* like your coding style. Something that most other tutorials completely lack. Keep it up!
@JustinPBarnett
@JustinPBarnett 3 года назад
Thanks so much Jack! More to come for sure 👍🏻
@REC_crazy
@REC_crazy Год назад
Hey, Great tutorial, worked out great! But I was wondering how you would animate the thumb?
@bsuermann27
@bsuermann27 2 года назад
When I started my VR project I would have never thought that it would look this advanced in the end. It does, all thanks to you and your very easy to follow tutorials. Thank you very much, Justin!
@Skurdt
@Skurdt 3 года назад
Really helpful video :) To avoid using string lookups in Update, you can call the static "Animator.StringToHash(string name)" in awake or start, store it in a field and then call the "animator.SetFloat(int id, float value)" overload.
@JustinPBarnett
@JustinPBarnett 3 года назад
Good tip! That'll definitely improve performance
@qianzhu9633
@qianzhu9633 2 года назад
As a novice, I usually watch your videos at the 0.75 speed to follow~ That's fine. Thank you so much for providing these valuable videos about VR & Unity!
@DFeargrieve
@DFeargrieve 2 года назад
For anyone like me who got a NullReferenceException pointing at the HandController script's "hand.SetGrip(controller.selectAction.action.ReadValue());" line, here's how I fixed it: I was using an XR Controller (Device-based) component on the Controller game objects and this tutorial uses an action-based one. Swap those out for both the left and the right hand controllers, then for EACH reference on that component make sure the correct input action references are put in for the left hand and the right hand - there are left-specific and right-specific references to hook up. After that there should be no null ref error.
@jeffleclerc2904
@jeffleclerc2904 2 года назад
Amazing tutorial. Had to do it twice cause I started with a rig I had set myself using device based controller and it ended up not working. Everything works except for the thumb and index now. only the whole hand closes. I'll figure it out later but really great work. I've just started with Unity and watched maybe 10 tutorials before yours, you're by far the only one who didn't get me loads of errors everywhere! haha
@JustinPBarnett
@JustinPBarnett 2 года назад
Hey thanks so much! Best of luck to you!
@ScNuke1
@ScNuke1 2 года назад
Did you get the thumb and index to work. For some reason both triggers animate the middle ring and pinky fingers but not the index and thumb.
@64jcl
@64jcl 2 года назад
Brilliant tutorial that covers so much ground and even good programming practices with RequireComponent. Going to redo my hands (another time) with all this in mind to get some practice with all these parts of Unity. The use of just one animation pose and filters is very useful as I was just about to make one animation per pose for even this. Naturally for other poses one would have to do new animations. Its also great to see that you can do so much within Unity itself and don't have to do this in Blender or other tools.
@JustinPBarnett
@JustinPBarnett 2 года назад
Thanks for the input! Yea, Unity's a pretty powerful tool
@joelson1181
@joelson1181 2 года назад
Never touched coding in my life. Most of it still doesn't make any sense to me but I managed to animate both hands! Thank you for the clear instructions and great video tutorial!!
@JustinPBarnett
@JustinPBarnett 2 года назад
Amazing! Great job!!
@patrickcrouch49
@patrickcrouch49 3 года назад
When lining the hand up with the controller pivot axis, make sure to move the hand by changing the numbers in the transform position boxes. If you try to drag the controller's pivot point in the editor, the hand moves too, which was initially confusing.
@JustinPBarnett
@JustinPBarnett 2 года назад
Good tip!
@ErikBorchersVR
@ErikBorchersVR 2 года назад
This was extremely confusing without this knowledge! Thank you.
@sniperscope9050
@sniperscope9050 2 года назад
yeah no matter what i do, for some reason, they both still move. one of my big problems lol
@DrMorbius01
@DrMorbius01 2 года назад
I use this tutorial the most, (getting the template to work with all projects..lol) you are the BEST!!!! Please know you are very much appreciated!
@JustinPBarnett
@JustinPBarnett 2 года назад
Thanks so much!!
@snowdayonline
@snowdayonline 2 года назад
Took me so long to find something explaining this stuff. Thanks so much!
@JustinPBarnett
@JustinPBarnett 2 года назад
You're very welcome!
@JustinPBarnett
@JustinPBarnett 3 года назад
Make a VR Game in this FREE Tutorial Series (includes Asset Download): www.vrcreators.io/the-confident-vr-dev
@sinanarts
@sinanarts 2 года назад
Hi can not see xr interaction toolkit in Visual studio.. What should I do.?
@broke8246
@broke8246 2 года назад
@@sinanarts same problem
@tzuriteshuba2704
@tzuriteshuba2704 3 года назад
Great Tutorial! For anyone who had the same issue as me where child objects could not be recorded/animated, make sure that none of the child objects of the object being animated (the one with Animator component) have an animator component on it.
@JustinPBarnett
@JustinPBarnett 2 года назад
Good tip!
@sharpenedaxe2
@sharpenedaxe2 3 года назад
CONGRATS ON 240 SUBS!!!
@JustinPBarnett
@JustinPBarnett 3 года назад
Thanks for being a part of the 240!! ❤️
@sharpenedaxe2
@sharpenedaxe2 3 года назад
@@JustinPBarnett No prob! Love ur content!
@JustinPBarnett
@JustinPBarnett 3 года назад
@@sharpenedaxe2 ❤❤❤
@clentlabauve1288
@clentlabauve1288 3 года назад
Thanks again! I just completed this tutorial without any problems!
@JustinPBarnett
@JustinPBarnett 3 года назад
Awesome!
@replacement_bot1198
@replacement_bot1198 3 года назад
I know you posted this awhile ago but I've been trying to get the hands to animate for about two hours, I've followed this tutorial about three times and triple checked every step. I'm not sure what I'm doing wrong. The code doesn't have any errors and the HandAnimator is exactly the same as yours. I did get the hands into a static fist and another time I had a static "okay" symbol, but that was as close as I got
@daninboutwell1274
@daninboutwell1274 3 года назад
I am having the same issue.
@JustinPBarnett
@JustinPBarnett 2 года назад
Join the discord if you're still having issues and we can help you troubleshoot!
@edisonguaman8863
@edisonguaman8863 2 года назад
hello, excellent video. I have a problem, everything works absolutely fine but when pressing the buttons the animation is played in a loop and I did deactivate the loop
@xZeroCCx
@xZeroCCx 3 года назад
The VR tutorials are GREAT! I'm new to unity and working in VR.
@JustinPBarnett
@JustinPBarnett 3 года назад
Thanks so much!!
@yks7188
@yks7188 2 года назад
Thank you very much for your video, which helped me a lot.😁
@JustinPBarnett
@JustinPBarnett 2 года назад
You are welcome!
@TheRelic1337
@TheRelic1337 3 года назад
Not sure if the toolkit was updated since you made this, but you can just toggle a checkbox for "hide controller on select" on the interactor in the inspector window.
@JustinPBarnett
@JustinPBarnett 3 года назад
Probably updated! Unity's doing so many updates nowadays it's hard to keep up! 😅
@brandonbannavong3200
@brandonbannavong3200 2 года назад
When I tried using this checkbox, my controllers still appear upon selection. Any idea why this would be?
@MountainDrew-h3u
@MountainDrew-h3u Год назад
Thanks Justin. Nice tutorial. I had previously used the hand prefab animation in the the XR Controller (with separate animations for Thumb, Index and Fingers). It worked fine except when it would hide controller on select. When de-selected, the animations would not return to the first frame. Your method of creating a single animation with layer masks and selecting which transforms to use based on Grip or Trigger is much cleaner, more extensible and flexible. Also, making the hand prefabs child objects of the controller seems to work better than editing the prefabs outside of the hierarchy. By creating a separate method to hide controller on select, it eliminated whatever bug is in Unity for the hand animations. I really appreciate the clean code behind and the shortcuts in Visual Studio (that i had forgotten). Are you still active making tutorials?
@JustinPBarnett
@JustinPBarnett Год назад
Glad to hear it! Recently I've been super focused on wrapping up the course. Regular videos starting back now! Next phase I'm working on is basically detailed devlogs of smaller projects I'm working on
@chasewestlake2326
@chasewestlake2326 2 года назад
Thank's a ton for the free models. You're fantastic.
@JustinPBarnett
@JustinPBarnett 2 года назад
You're very welcome!
@henriquebf
@henriquebf 2 года назад
Another great video. Just joined your patreon. Keep doing the excellent work. :)
@JustinPBarnett
@JustinPBarnett 2 года назад
Wow thanks so much! I appreciate you
@TheDukersrules
@TheDukersrules 3 года назад
Hey, amazing video! Thank you so much for doing this. Just for future reference, your camera being that big in the bottom right hand corner does cover up some of what you are doing in the inspector on unity and it would be helpful if the viewer could see everything!
@JustinPBarnett
@JustinPBarnett 3 года назад
Fixed it in the most recent UI video! Thanks for the input!
@lovesforgotenname
@lovesforgotenname 2 года назад
this has been great in getting me into VR development and helping with my final project from my bachelor of game design thanks so much
@JustinPBarnett
@JustinPBarnett 2 года назад
Amazing! You're so welcome!
@lovesforgotenname
@lovesforgotenname 2 года назад
After following through this one and the physical hands one I'm having a problem with the hands disappearing seems they're falling through the ground. These should work with you 2022 video set up right
@bigj7864
@bigj7864 3 года назад
oh my god you are a life saver i am so happy you are doing this thank you. cant wait to have vr hands
@JustinPBarnett
@JustinPBarnett 3 года назад
Haha you’re welcome big J!
@bigj7864
@bigj7864 3 года назад
@@JustinPBarnett (:
@jehriko7525
@jehriko7525 2 года назад
Thanks for making this tutorial!
@JustinPBarnett
@JustinPBarnett 2 года назад
You’re so welcome!
@MEJHarrison
@MEJHarrison 3 года назад
Great video. I had a few problems along the way, but I managed to work them all out. I also used the pre-fab XR rig from the first tutorial. That was a nice time-saver. Now I have another prefab, with hands..
@JustinPBarnett
@JustinPBarnett 3 года назад
Great to hear!
@sharpenedaxe2
@sharpenedaxe2 3 года назад
Keep up the good work! Only helpful unity VR channel I swear!
@JustinPBarnett
@JustinPBarnett 3 года назад
Yea I've run into that issue too. The only way I could figure out to get around it is to copy the code from that script into a text file or something, then delete the .cs file and then recreate the script, but from within the component. Let me know if that works!
@sharpenedaxe2
@sharpenedaxe2 3 года назад
@@JustinPBarnett Thanks! What also worked was just deleting the script, the creating a new one....? Idk. But thanks for your help! You're seriously the most helpful channel!
@JustinPBarnett
@JustinPBarnett 3 года назад
@@sharpenedaxe2 glad you got it working!! And thanks so much 😀
@jason_skillman
@jason_skillman 2 года назад
Great tutorial! For those struggling with getting the right hand animations to work make sure that when you attach the animation controller to the right hand the animation is linked up correctly (since the animating was down with the left hand). I had to rename all of the right hand bones from "hands:b_r_hand" to "hands:b_l_hand" so the animations linked up again since animations are case sensitive.
@G4laxyExtrem
@G4laxyExtrem Год назад
In the controller script, use : controller.selectActionValue.action.ReadValue() instead of controller.selectAction.action.ReadValue(). Otherwise your ReadValue will only return a 0 or a 1.
@JasonVerro
@JasonVerro 2 месяца назад
Thanks, I had this issue. Solved
@drseed2828
@drseed2828 2 года назад
Thanks a lot for the tutorial! I don't have a headset yet but used the simulator, to do this tutorial. I have some errors, but will review them, to see if I can fix them myself. Just wanted to say thankyou, in the meantime.
@JustinPBarnett
@JustinPBarnett 2 года назад
You’re so welcome!
@drseed2828
@drseed2828 2 года назад
@@JustinPBarnett I received my Quest 2 last week, and also had to replace my computer, but finally managed to get this all working correctly! To help others, I thought I might share my errors. First off I did all my Animator setup, using the LeftHand Animator Controller, instead of using the HandAnimator Animator Controller, because it was selected, and I didn't check to see if I was using the right one. In the Animated hand method, intellisense filled in: ( Time.captureDeltaTime ) "triggerCurrent = Mathf.MoveTowards(triggerCurrent, triggerTarget, Time.deltaTime * speed);" // with "triggerCurrent = Mathf.MoveTowards(triggerCurrent, triggerTarget, Time.captureDeltaTime * speed);" I didn't catch the 'capture' added in, error in the Grip portions of the Animated Hand method, either. These errors caused my hands not to play the Grip or Trigger animations. Now I can finally continue with your other tutorials.
@redshellsbigchungus5575
@redshellsbigchungus5575 3 года назад
smashes like button aggressively
@JustinPBarnett
@JustinPBarnett 3 года назад
🙌
@ZaPStarfare
@ZaPStarfare 3 года назад
If the interpolated frames look odd (the fingers were kind of twisting in my case) you can change the interpolation mode to quaternion to fix that. Very useful video series, thanks.
@JustinPBarnett
@JustinPBarnett 3 года назад
Thanks for the tip! Glad you like the series so far!
@jakesmm8722
@jakesmm8722 2 года назад
My Fingers are doing the same but I cannot find the setting to change the interpolation mode to quaternion. Can you help me find it?
@jakesmm8722
@jakesmm8722 2 года назад
I found it. Thank you for this! If anyone else cant find it you need to right click the transform properties in the animation window.
@marcusmunoz2779
@marcusmunoz2779 3 года назад
These videos are so useful and informative. Thanks for sharing your understanding in a motivating and encouraging way!
@JustinPBarnett
@JustinPBarnett 3 года назад
Thanks so much! Hope they help you out! 👍🏻
@kje081697
@kje081697 3 года назад
Love your videos, great work. Quick question: for some reason my hands fall through the world is there any suggestion on what could be the problem or how i could fix it?
@superman50196
@superman50196 3 года назад
Not sure if you've fixed this yet, but try turning on "Is Kinematic" in the Rigidbody settings for the hand if it's not turned on.
@JustinPBarnett
@JustinPBarnett 2 года назад
👆
@Heisenberg719
@Heisenberg719 2 года назад
Thanks i've been looking for a easy video to set up hand controllers.
@JustinPBarnett
@JustinPBarnett 2 года назад
No problem 👍
@abdulraheem_taha
@abdulraheem_taha 2 года назад
Super clear and helpful. Great as usual.
@JustinPBarnett
@JustinPBarnett 2 года назад
Glad it was helpful!
@kirbymybae
@kirbymybae 3 года назад
Hey Justin! I know I have yet to respond to that other comment I made. I start using visual studio community or whatever instead of visual studio code and that actually helped a lot. I assumed something was wrong when I would type something in and there was no option to fill out the rest. But anyways, Whenever I try to close the three fingers, they start looping. And yes, I did the troubleshooting. The thing is, when I put just my index finger down, the looping doesn't happen. This has been my ending point for any other tutorial and I will be very excited to continue. Thank you!
@scottmoore1126
@scottmoore1126 3 года назад
Hey, I had the same issue it doesn't seem like any of comments help, my issue was in setting up the animation transitions (about the 12 minute mark) I had the greater than/less than around the wrong way on the grip. Hopefully you have already solved it or moved on, but maybe this will help someone else?
@JustinPBarnett
@JustinPBarnett 2 года назад
Join the discord if you're still having issues and we can help you troubleshoot!
@AnsityHD
@AnsityHD 3 года назад
Hey, apologies if this is a stupid question, I can't find anything about this online. How do you change the direction of the Ray Interactor to point forward? Mine point upward (in the direction of your thumbs), and I can't see anything related to 'direction' or 'angle' in the component or documentation D:
@JustinPBarnett
@JustinPBarnett 3 года назад
That's actually a very good question! Mine just started out pointing straight forward. You must be using a different device. This may be something you'll have to end up coding in a script.
@AnsityHD
@AnsityHD 3 года назад
@@JustinPBarnett Ah, okay no problem! Might be some weirdness somewhere with the Quest 2 and air link. I'll keep experimenting 👍
@JustinPBarnett
@JustinPBarnett 3 года назад
@@AnsityHD let me know if you find out the answer! I’m genuinely curious
@AnsityHD
@AnsityHD 3 года назад
​@@JustinPBarnett I found a hacky solution for the time-being. When the game starts, an "Original Attach" object is instantiated under the hand objects, which is what the Ray Interactor uses for the ray direction. In a script, I just change the rotation of this object and it gives the result I'm looking for.
@JustinPBarnett
@JustinPBarnett 3 года назад
@@AnsityHD You might be able to create an empty game object and put it into the "original attach" input of the ray interactor at the beginning and just adjust that game object's position and rotation to adjust the offset
@TB3hnz
@TB3hnz 2 года назад
This tutorial was very thorough. Was able to build to my Quest 2 on Linux Mint! I have a Windows laptop so I was able to toggle the developer options there. A bit inconvenient that I have to make builds to play test, but, just like you said, the test results yielded a higher quality on my end. all I had to do was keep replacing the apk file, for every time I made changes. Because of you, I made hands work! Thank you sir! Edit: How are you able to get objects to snap to the pivot of your hand?
@superbitysoft1786
@superbitysoft1786 3 года назад
Thanks I found this tutorial super useful
@JustinPBarnett
@JustinPBarnett 3 года назад
You're welcome! Glad I could help 😊
@k1ng401
@k1ng401 2 года назад
Hi Justin. When you made this tutorial was selectAction a Button type that only returns a value of 0 or 1 (Not Clicked or Clicked) like it is now? The value to use now (maybe wasn't available when this tutorial was made) is selectActionValue which returns the value of the Grip trigger as a float and lets you set the animation directly from that float value. But maybe it wasn't like that when you made this?
@JustinPBarnett
@JustinPBarnett 2 года назад
Yea I think there have been some updates that have broken the values. Probably about time for me to do an update video.
@k1ng401
@k1ng401 2 года назад
@@JustinPBarnett given you can now access the float value of the grip and trigger directly, you don't need that gripCurrent => gripTarget code any more or the speed adjustment. You can just set the Animation Grip and Target values to be the same as the gripTarget and gripCurrent values and the animation will exactly match your speed of gripping and triggering and you can half grip or half trigger etc.
@k1ng401
@k1ng401 2 года назад
@@JustinPBarnett do you know if there is a way I can use the masks we created to create stand alone animations that we can save off into the Assets folder? I want to use the 2D Freeform Cartesian method of handling the animations but I can't incorporate masks into that (or I can't work out how I could). I was thinking I could use the masks to create each animation and then save those. It might be that Masks and Direct are a better way to do it anyway but I just thought there might be a way to create mini standalone animations from a main one.
@stephenmackenzie9016
@stephenmackenzie9016 2 года назад
I am using a full body rig so adjusted the scripts to work on a single mesh, masking out left and right hands. The annoying thing is, transform based avatar masks don’t work with humanoid rigs (where you mask out individual bones)
@JustinPBarnett
@JustinPBarnett 2 года назад
Oh dang, yea that is annoying
@mzh99
@mzh99 2 года назад
Good stuff, Justin. I think you could also save yourself some pain by doing a partial import from the Oculus Integration package. Just import the Animations and Core Custom Hands in the SampleFramework folder. This will give you all the controllers, animations, models, etc. Then you can write your custom handler script and work with the poses you want. I'm part way through the process and it looks to be a big timer-saver.
@JustinPBarnett
@JustinPBarnett 2 года назад
Clever! That's a great idea!
@THE_ONLY_GOD
@THE_ONLY_GOD 2 года назад
Can likely make one method for multiple buttons that have same type as input. More efficient that way. Are there enums in C#? If so, can make a switch statement to switch on a button enum.
@JustinPBarnett
@JustinPBarnett 3 года назад
Comment what VR game you want me to make next!
@sambingham07
@sambingham07 3 года назад
very clear, great tutorial. wish i could watch a completed series right now, can't wait for more! thank you
@JustinPBarnett
@JustinPBarnett 3 года назад
@@sambingham07 Thanks so much Sam! I've got a video for you AT LEAST every week 👍
@ruannel400
@ruannel400 3 года назад
A bowling game maybe ?
@JustinPBarnett
@JustinPBarnett 3 года назад
@@ruannel400 already in the works! That’ll be the next video!! 🎳
@sharpenedaxe2
@sharpenedaxe2 3 года назад
@@JustinPBarnett EPIC! Just what I wanted!
@MEJHarrison
@MEJHarrison 3 года назад
I finished this tutorial last night, but wanted to play some more. I ended up with three blocks, red, green and blue that I could play with. Then I made a game object of the table and three blocks so I could easily duplicate it. Soon enough I had another table next to it with three different colored balls. That went really smoothly. Then I made a third table with a low-poly car asset I found on the Asset Store. Then there was some learning, but I got it all working. In the end I had 6 tables with cubes, balls, cars, food, weapons and a male and female character dummy. Basically the first interesting free stuff I came across in the store.
@JustinPBarnett
@JustinPBarnett 3 года назад
Wow, way to go! You're making amazing progress!!
@MEJHarrison
@MEJHarrison 3 года назад
@@JustinPBarnett You had mentioned VR with Andrew in some video. So I caught a few of his videos. He was making a gun that shot a target and showed the score above the target. Since I already had a handgun and an assault rifle on my table from goofing around, I followed his tutorials and can now shoot both of them. I'm only on day 10 with VR development (and Unity), but I can feel it starting to click into place. I think the next major hurdle is going to be where I can just put together a widget and know what to do and how to do it. For example, I've come across, but not watched, videos on how to make push buttons. At this point, I could get part of the way, but would need a video to get me all the way. And it would almost certainly be just horrible code hacked together if I did manage to make it work. I'm looking forward to the day when I could put some random widget (elevator buttons, reloading a gun, glass lens that peeks into a different dimension) together properly without a video. That's just going to take a lot more than 10 days. I need to become proficient at React, Node.js, Javascript (for some damn reason) and AWS for my job. Ok, the AWS stuff is a lot of fun to be honest. VR for fun. And in a few more weeks, SwiftUI 3 and iOS 15. That's just for fun too. I'll get there eventually.
@JustinPBarnett
@JustinPBarnett 3 года назад
@@MEJHarrison I’d highly recommend using a framework if you want to save on TONS of time learning how to do things. A lot of these frameworks have guns, buttons, UI and other things built in
@MEJHarrison
@MEJHarrison 3 года назад
@@JustinPBarnett I'm fine wasting the time for now. I don't mind inventing a few wheels at this point because I'll learn tons doing so.
@JustinPBarnett
@JustinPBarnett 3 года назад
@@MEJHarrison Then you aren't really wasting time! You're learning, which is the important part right now
@SimpleDays101
@SimpleDays101 3 года назад
You're seriously the MVP!
@JustinPBarnett
@JustinPBarnett 3 года назад
Thanks!! 🙂
@rubendariogaldamezsalinas5717
@rubendariogaldamezsalinas5717 2 года назад
HI Justin, was a Really helpful tutrorial, Thanks im new into VR development, I had the problem that my IDE (VS code) didn't autocomplete but I managed to solve it, for those who are new I recommend seeing a tutorial of how to setup VS code and unity before following this tutorial. Thanks for the tutorial justin great work (:
@JustinPBarnett
@JustinPBarnett 2 года назад
You're so welcome! And good tip
@THE_ONLY_GOD
@THE_ONLY_GOD 2 года назад
Recommend the best tutorial video for that? Thanks in advance!
@TylerGamble1
@TylerGamble1 2 года назад
Hi Justin, i am stuck at the 23 minute mark. I dont think my HandController script and Hang scripts are not communicating together. I get an error "NullReferenceException: Object reference not set to an instance of an object" . Which I believe is referring to an object that doesn't exist. I am currently working on it in your discord with some members but have not solved yet. Thanks Justin! EDIT: We figured it out hours later. Im glad you have the discord channel! People are very helpful and sometimes you just need to talk it out with someone else
@JustinPBarnett
@JustinPBarnett 2 года назад
Glad you got it figured out! Love the discord ♥
@THE_ONLY_GOD
@THE_ONLY_GOD 2 года назад
Instead of that part at the end with the hiding hands, would have been recommendable to have originally posed the hands in a "grip" shape rather than a fist and then had a small cylinder to pick up. Would have looked better. Thanks for posting that tutorial!
@JustinPBarnett
@JustinPBarnett 2 года назад
Thanks for the tip!
@orin4654
@orin4654 3 года назад
Quick question: Would you ever consider putting the code used in your video in the description or something? Its kinda hard to follow along. BTW Kudos to you for answering every commend. Pretty impressive and im sure it'll pay off!
@JustinPBarnett
@JustinPBarnett 3 года назад
You can get access to all the code from every single tutorial by supporting me over on Patreon! www.patreon.com/justinpbarnett
@slim5684
@slim5684 3 года назад
You Earned a Subscriber to because I like the way you explain things.
@JustinPBarnett
@JustinPBarnett 3 года назад
Thanks!!
@loukenart
@loukenart 3 года назад
hello! i really REALLY want to learn vr but i suck at code :( so could you show how to code a bit in vr and explain it carefully so its easy to understand. cuz english is not my main language so its hard to follow english tutorials unless they explain very carefully. other than that, its a great tutorial! keep it up!
@JustinPBarnett
@JustinPBarnett 3 года назад
I'll do my best to explain everything! There are also entirely visual scripting tools like PlayMaker on unity's asset store where you don't need to know how to code!
@THE_ONLY_GOD
@THE_ONLY_GOD 2 года назад
Looking forward to the tutorial on procedurally generating and mapping a full procedural XR avatar with procedural PBR materials!
@JRule237
@JRule237 3 года назад
Great tutorial, thanks so much! This helped me animate the hands on space robot kyle without too much trouble :)
@SpiritRaps
@SpiritRaps 3 года назад
What's your discord? I would love to speak to you about this. I want to achieve this with a full body model like you did. But I want to know how you did it. Spirit#2325
@JRule237
@JRule237 3 года назад
@@SpiritRaps Sent you a discord invite. I'm very new to VR dev but I'll share what I can!
@JustinPBarnett
@JustinPBarnett 2 года назад
Awesome!!
@nixxstream
@nixxstream 2 года назад
i'd love to see a tutorial on doing this with the IK body stuff you'v done
@JustinPBarnett
@JustinPBarnett 2 года назад
Yes! I'd like to do a full body IK video shortly
@THE_ONLY_GOD
@THE_ONLY_GOD 2 года назад
Tip: Can also import Animation Rigging package for easier alignment using "Align Transforms".
@JustinPBarnett
@JustinPBarnett 2 года назад
Good tip! Thanks!
@bren4409
@bren4409 2 года назад
My hands won't play the grip animation for some reason. All of the code works fine, and the animation's in the blend tree on a separate layer, but it only plays the trigger animation. The grip button just does nothing. Edit: Nevermind. Figured it out. Turns out I hadn't paid close enough attention to the video, and my grip layer was set to 0. This man really covers everything. No detail left behind.
@JustinPBarnett
@JustinPBarnett 2 года назад
Glad you figured it out!
@Riprog
@Riprog 2 года назад
Thanks for this Tutorial Justin, great stuff! Is there some way to implement the built in functionality of "Hide controller on select" when using animated hands, so you don't have to script it?
@JustinPBarnett
@JustinPBarnett 2 года назад
There's a checkbox in the inspector on the xr controller component!
@sharpenedaxe2
@sharpenedaxe2 3 года назад
So sorry to bother you again, but I pressed ctrl + . , and it just brought up two things. Both involving the control;, not the action based controller. Is there a way to fix this? Or is there something im missing?
@JustinPBarnett
@JustinPBarnett 3 года назад
Hmmm maybe just add in the using statement directly by typing it into the top. The control + . thing is finicky sometimes
@vesnadobricic2624
@vesnadobricic2624 3 года назад
This was super helpful! Thank you so much. Btw is there a way to save this scene including the xr rig and hands and scripts in a way that I can have it as a preset for other projects?
@JustinPBarnett
@JustinPBarnett 3 года назад
You’re so welcome! And yea! Save the XR rig as a prefab and then you’ll just have to copy the scripts over to whatever new project
@Itama22
@Itama22 2 года назад
Somehow I always get a NullReference on that line: "hand.SetGrip(controller.selectAction.action.ReadValue());" It seems like I got a problem go get out the Values of my VR Controllers. I am using the XR Interaction Tooltip / Controllers (Action Based) and the HP Reverb G2 VR Headset + Controllers. In XR Analysis all Values are correct, so I don't know why I can't get the Float values for Grip and Trigger :( Soneone got an idea?
@JustinPBarnett
@JustinPBarnett 2 года назад
Yea there's a new issue where the Index and HP controllers are not working with OpenXR at the moment... Some bug Unity introduced recently
@Itama22
@Itama22 2 года назад
@@JustinPBarnett Oh okay, is there a Workaround for that issue? Because I need to make a little VR Project the next 2 month and those controllers are all I got :(
@Itama22
@Itama22 2 года назад
@@JustinPBarnett I'm using XR Interaction Toolkit and Tracking + grapping Interactables still work btw.
@firenado2387
@firenado2387 2 года назад
Thank you so much for the models. If i choose to sell a game i make using these models, do i need to provide credit/commision or anything like that in the description or somewhere in the game? If so, how? I am very new to all this so please forgive my beginer stupidity.
@Somiaz
@Somiaz 2 года назад
So I'm really stuck. I'm at 16:50 and I can't use normal floats. It wants me to use a Func instead, now that would be easy if Time.deltaTime was one as well. Which it isn't. So now I'm just going back and forth with no hope in solving this annoying problem. Incase you're wondering, I'm using 2021.1.14f1
@zorikgevorgyan183
@zorikgevorgyan183 2 года назад
What did you use for the coding, and couldn't you at least tell us that we need (for example) C#
@JustinPBarnett
@JustinPBarnett 2 года назад
Unity uses the C# language. I use JetBrains Rider as my IDE to code in.
@minhdungdo4541
@minhdungdo4541 3 года назад
Hi Justin, Love your contents very informative and clear instructions. However I faced an issue, could you give a little bit of insight? I have untoggled the closeHand animation. So now the trigger working correctly but the grip is still looping. Have miss a loop animation somewhere?
@JustinPBarnett
@JustinPBarnett 3 года назад
Thanks! and yea if you click on the close hand animation, just uncheck "loop animation" and you should be good
@minhdungdo4541
@minhdungdo4541 3 года назад
@@JustinPBarnett Thank you, I did do that. But the grips animation still looping.
@heinzdoofenschmirz1
@heinzdoofenschmirz1 3 года назад
@@minhdungdo4541 Ive got the same problem, trigger animation works fine and does not loop, grip animation is looping... Did you find a solution?
@scottmoore1126
@scottmoore1126 3 года назад
Hey man, I had the same issue it doesn't seem like any of comments help, my issue was in setting up the animation transitions (about the 12 minute mark) I had the greater than/less than around the wrong way on the grip. Hopefully you have already solved it or moved on, but maybe this will help someone else?
@Minecraftler007
@Minecraftler007 2 года назад
@@scottmoore1126 Thank you so much. I made the same mistake and could fix it!
@franklinholm2142
@franklinholm2142 Год назад
I couldn't find the Avatar after rigging the hand, had to go to the hand model -> Rig, and add under Avatar Definition use "Create From This Model"
@dexterdexter747
@dexterdexter747 2 года назад
Hi, thank you for making this great video. I just wanted to know how you'd go about exporting the hands with their animations so you can reuse them in different projects? Thanks!
@tonirodriguez5938
@tonirodriguez5938 3 года назад
i love this project good job
@JustinPBarnett
@JustinPBarnett 2 года назад
Thanks!
@tacticalmythic7945
@tacticalmythic7945 2 года назад
I have a question at 15:27... The hand variable doesn't show up :(. It says I am missing a reference maybe? Is it because XR changed a lot of code this past month like Action based and Devices that now this code won't work?
@JustinPBarnett
@JustinPBarnett 2 года назад
Yea you'll need to change all the "XRRig" code to "XROrigin". It should give you a suggestion of what to change it to in the errors you get.
@tacticalmythic7945
@tacticalmythic7945 2 года назад
@@JustinPBarnett could you tell me the code? I am lost 😂. Or maybe we can join a discord call or something?
@JustinPBarnett
@JustinPBarnett 2 года назад
@@tacticalmythic7945 all the code is in the video! Or if you want a download version just click on the Patreon link in the description!
@tonypitman5648
@tonypitman5648 3 года назад
I was wondering if you have done a video yet on making the XR Rig respect physical and gravity and locomotion / teleporting and all that good stuff?
@JustinPBarnett
@JustinPBarnett 3 года назад
It’s in the works!!
@tonypitman5648
@tonypitman5648 3 года назад
@@JustinPBarnett Awesome!
@jgame4734
@jgame4734 3 года назад
just throwing this out there... you could make a tutorial on menus, like pause menus and all
@JustinPBarnett
@JustinPBarnett 3 года назад
Absolutely! That's already on my list of videos to make!
@guusheerkens
@guusheerkens 3 года назад
I got the code working, but when i press the grip the whole close animation plays and when i press the trigger nothing plays. Could somebody help me?
@JustinPBarnett
@JustinPBarnett 2 года назад
Join the discord and we can help you troubleshoot!
@bazerkgaming5566
@bazerkgaming5566 3 года назад
hey this was an amazing tutorial but can you make a link so that i can just copy and paste the code?
@JustinPBarnett
@JustinPBarnett 3 года назад
Yea! You can get the source code from all my tutorials by supporting me on Patreon here! www.patreon.com/justinpbarnett
@bazerkgaming5566
@bazerkgaming5566 3 года назад
@@JustinPBarnett thank you so much!
@bazerkgaming5566
@bazerkgaming5566 3 года назад
@@JustinPBarnett darn i have no money :/ ill just write it out lol 😅
@CreativerseYT
@CreativerseYT 2 года назад
justin great vid i just need some help at 17:59 where you put animator = GetComponent the animator thing says The name 'animator' does not exist in the current context help pls
@CreativerseYT
@CreativerseYT 2 года назад
Nvm i got it to work
@JustinPBarnett
@JustinPBarnett 2 года назад
Glad you got it working!
@CreativerseYT
@CreativerseYT 2 года назад
@@JustinPBarnett thx but I was animate the hand the left works but the right just attach it self the the left hands
@jaybee_plays8940
@jaybee_plays8940 3 года назад
this is a great video, but i had a slight problem as the hand models were following the controllers but a couple of meters up from where they were meant to be. thanks :)
@JustinPBarnett
@JustinPBarnett 3 года назад
Try adjusting the offsets!
@jaybee_plays8940
@jaybee_plays8940 3 года назад
@@JustinPBarnett thanks, also im not really sure what to do because 'ctrl .' didnt work for me, and i am using the same software. thanks
@JustinPBarnett
@JustinPBarnett 3 года назад
@@jaybee_plays8940 add the using statement at the top
@jaybee_plays8940
@jaybee_plays8940 3 года назад
@@JustinPBarnett i did that :)
@JustinPBarnett
@JustinPBarnett 3 года назад
@@jaybee_plays8940 that’s all the control + . Action did in the video
@EnexS02
@EnexS02 Год назад
Great tutorial, I'm using the Quest 2 and on the default controller the thumb has a different action than the trigger, how could I capture that and animate the thumb separately? What should I use instead of selectAction or activateAction to get the thumb touches joystick action?
@CupidGTag
@CupidGTag Год назад
I need a bit of help with mine, my visual studio isn't linked to my unity project like yours, for example I can't just ctrl + . to assign whatever to that, neither can I access the class. Edit: Misunderstood a few things and got a bit of the way through linking it like that, but I still can't just do ctrl + . Edit 2: I am trying to use my face buttons for the thumb instead, but I can't use bools, what should I do for all the scripts that demand the floats?
@daveseamons5479
@daveseamons5479 3 года назад
Still learning, your tutorials are a great help. On this one, I just cant figure out why my setup defaults to closed rather than the open default. Seems like I have followed all the settings as shown.
@JustinPBarnett
@JustinPBarnett 3 года назад
Huh, I just saw someone else commenting the same issue. Not sure, but I'll look into it.
@Metasynapse74
@Metasynapse74 2 года назад
I had this too. Figured out it was because the Base Layer in the animator had automatically added a transition from the Entry state to Close. Deleting the Close state from Base Layer fixed it for me.
@bryantsview1652
@bryantsview1652 2 года назад
@@Metasynapse74 OMG your are an absolute G THANK YOU! I thought there was something wrong with the valve index inputs. My index hands are finally working! Also if anyone is using the index controllers and is seeing the input value as an integer; in handcontroller.cs, change hand.SetTrigger(controller.activateAction.action.ReadValue()) to hand.SetTrigger(controller.activate *ActionValue* .action.ReadValue())... (change activateAction to activateActionValue )then it should display as a float.
@antdog4117
@antdog4117 2 года назад
On line 22 and 23 on the hand control tab, I have a CS1061 error for 'object does not contain a definition for 'action'. The word action is red underlined. When I press ctrl + . It doesn't give me an option to fix it. Can you help me?
@Fargothn
@Fargothn 2 года назад
Bump for 'action'
@antdog4117
@antdog4117 2 года назад
@@Fargothn 17:00 right?
@JustinPBarnett
@JustinPBarnett 2 года назад
Check the top of the file and make sure you have all the same using statement that I do
@Fargothn
@Fargothn 2 года назад
@@JustinPBarnett I have finished this tutorial before and everything worked but the next day when I was importing something it messed up my code and when I press CTRL+. on it nothing happens
@Fargothn
@Fargothn 2 года назад
@@JustinPBarnett my using statements are the same
@saroule
@saroule 2 года назад
How does it compare to the new Oculus interaction SDK? It's better to follow which one? (for a new project) thanks!
@JustinPBarnett
@JustinPBarnett 2 года назад
Oh the Oculus integration is going to be much better! I'm playing around with it some now. Probably will be coming out with tutorials about setup soon
@saroule
@saroule 2 года назад
@@JustinPBarnett oh that'll be awesome, because I'm completly lost following tutorials on internet, just to add a locomotion manager that work with it :D
@mustachepotet7726
@mustachepotet7726 2 года назад
What did you do on 26:34? Can't see what you're doing behind the facecam.
@JustinPBarnett
@JustinPBarnett 2 года назад
Add the component to the event and then toggle the visiblity on or off
@jehriko7525
@jehriko7525 2 года назад
I just noticed, and it's likely due to my version being just barely higher, that I don't have a red box surrounding my hand models (both the left and right instead of just 2 left hand models, if that matters) so how would I go about editing the position of my hand-model's pivot point in version 2021.2.11f1? I didn't think it'd be that big of a difference sense it's only 0.0.11 off
@JustinPBarnett
@JustinPBarnett 2 года назад
Ask in the discord if you're still having issues and we can help you troubleshoot!
@manuelillanes1635
@manuelillanes1635 3 года назад
How do you add the first keyframe to the animator? I try to do what you do but there is no keyframe added to the hands In fact I've tried animating with the record button on but nothing works. No animation at all. What can I be doing wrong?
@JustinPBarnett
@JustinPBarnett 2 года назад
Join the discord and we can help you troubleshoot!
@jaybenny5477
@jaybenny5477 2 года назад
thanks for your converted files (hands) :D
@JustinPBarnett
@JustinPBarnett 2 года назад
You’re welcome!
@chriscannon4195
@chriscannon4195 3 года назад
so ive tried using the code that you have in the video and it keeps telling me that there is no class HandController in unity. also the public float speed doesnt come up in the inspector. and i have no idea what is going wrong
@JustinPBarnett
@JustinPBarnett 2 года назад
Join the discord and we can help you troubleshoot!
@Servbot42
@Servbot42 3 года назад
Went as far as I could in this video. Started getting issues when the hand models came out really huge. Both the hand and hand controller would resize the model(I made it small, and when I hit play, I see the red lasers, but my hands were tiny and up in the air). Besides that, I tapped out on the coding section because I dont really want to code as I have had bad history with it, and also my 30 day trial for the coding program is up so its locked behind a paywall. Good video though, I was able to follow through up to that point. Off to the thick-accented tutorials for this particular lesson.
@JustinPBarnett
@JustinPBarnett 3 года назад
What code software are you using? Visual Studio Code is free forever! What point in the video got confusing for you? This one was pretty long and complicated so I don't blame you at all
@icyalex332
@icyalex332 3 года назад
@@JustinPBarnett I use Visual Studio and when I dragged the Hand Script in the "Left Hand" and "Right Hand" it says, "The script didn't inherit a native class that can manage a script"
@MrJostrooper
@MrJostrooper 3 года назад
Very clear video, thanks for that. I want to use vr to walk through my architectural models. I also want to see my hands, but also the controller. I don't want to see the red teleportation line. But to walk through the model I want to use the rotation button on the controller. I managed that with a previous version. But how do you set that up with the new version?
@JustinPBarnett
@JustinPBarnett 3 года назад
Check out the VR movement tutorial I have! I think you might have found it already
@eyalretter2354
@eyalretter2354 2 года назад
Hi Justin, T.hank you for this tutorial. I am trying it now. Draging the fabs into the left/right hand, building and running, I get the hands straight to my face. whenever I look, the hands right in front of my eyes... even before doing the animation thing. why ?
@JustinPBarnett
@JustinPBarnett 2 года назад
Join the discord if you're still having issues and we can help you troubleshoot!