Hey guys ! I made an update of this series on my channel Valem tutorial that you can find here : kzbin.info/www/bejne/nH6TnGWkbNprqcU
@ValemVR4 жыл бұрын
Hi guys, hope you enjoyed this video. Here is a little bonus for you. Bellow you will find a script that you can attached to any gameobject with an HingeJoint and that will trigger a particular Event when it reached its min or max limit. You can use it to trigger anything you want with the lever for example !! :) ------- using UnityEngine; using UnityEngine.Events; public class HingeJointListener : MonoBehaviour { //angle threshold to trigger if we reached limit public float angleBetweenThreshold = 1f; //State of the hinge joint : either reached min or max or none if in between public HingeJointState hingeJointState = HingeJointState.None; //Event called on min reached public UnityEvent OnMinLimitReached; //Event called on max reached public UnityEvent OnMaxLimitReached; public enum HingeJointState { Min,Max,None} private HingeJoint hinge; // Start is called before the first frame update void Start() { hinge = GetComponent(); } private void FixedUpdate() { float angleWithMinLimit = Mathf.Abs(hinge.angle - hinge.limits.min); float angleWithMaxLimit = Mathf.Abs(hinge.angle - hinge.limits.max); //Reached Min if(angleWithMinLimit < angleBetweenThreshold) { if (hingeJointState != HingeJointState.Min) OnMinLimitReached.Invoke(); hingeJointState = HingeJointState.Min; } //Reached Max else if (angleWithMaxLimit < angleBetweenThreshold) { if (hingeJointState != HingeJointState.Max) OnMaxLimitReached.Invoke(); hingeJointState = HingeJointState.Max; } //No Limit reached else { hingeJointState = HingeJointState.None; } } }
@rjerezc4 жыл бұрын
Amazing job as always. Thank you so much
@Mex-ge9kj4 жыл бұрын
Me: *ctrl + c's in visible neediness*
@kingfhd24244 жыл бұрын
Now thats Epic. Can you make climbing (or you cant do that)
@Okerishma4 жыл бұрын
This solves exactly what I was struggling with. THANKS!!
@kingfhd24244 жыл бұрын
valem this is week can upload a video?
@ayitsalex28934 жыл бұрын
I want to get into vr development and I find these videos incredibly helpful, please never give up on us 🥺
@jonasmg2 жыл бұрын
9:04 god I love that reference. Thank you for both teaching and having excess energy to joke around xD
@LivanderGamedev4 жыл бұрын
continue this series please, I love it and I want to learn more
@donmacsween28424 жыл бұрын
Great video as always, but could I suggest a tutorial on creating custom hand poses for grabbing different shapes? As having the player's hands disappear every time you grab is very immersion breaking.
@Wayloz4 жыл бұрын
In his earlier tutorial of this exact series of tutorials, he explained how to import custom models and animate them depending on inputs.
@Xzarations4 жыл бұрын
I could tell you might have been watching Dani lately based on 9:07
@meeperhere4 жыл бұрын
ye ur right
@deathcoredude65652 жыл бұрын
Valem, I currently work with UNMC in VR simulation and there has been so many times your videos have saved me. Thank you so much for all your hard work!
@xanderbuyst15214 жыл бұрын
these videos are amazing and so helpfull, keep em coming!
@PhillipsAlbright2 жыл бұрын
Hinge joint is useful to know even outside of VR, great things to know from this tutorial
@jaythevrgamer71404 жыл бұрын
Thanks for being so detailed! For me, the user interface was really hard to get used to at first. But, like any software, it becomes pretty simple after a while and pretty user friendly. Good stuff!
@mfproduct4 жыл бұрын
Your videos are fantastic, just stumbled across you there other day and loving the content. You don't waste time with long intros or fluff, just straight into the doing of things.
@TreFlack1014 жыл бұрын
Jumping and Sprinting with this controller would make this new Subscriber VERY HAPPY!!
@denisthefuzz3 жыл бұрын
Valem, tu résouds tous mes problèmes. Un grand merci. Je vais essayer d'implémenter tes solutions dans mon projet, et ensuite j'irai sur ton patreon. Incroyable, après m'être infusé des tutoriels incompréhensibles pendant des plombes, j'ai enfin trouvé tes vidéos et je n'ai plus qu'à suivre le guide... Je viens de regarder les 7 à la suite ! Encore merci, j'espère que je vais y arriver.
@UXVirtual4 жыл бұрын
Thanks for making this video! I've been trying figure out how to optimally use the physics joints in Unity for VR. You really explain it well and your approach will be universal to other Unity VR interaction frameworks too.
@GwynPerry4 жыл бұрын
This is excellent. I wasn't expecting it to be so straight forward. The only thing I would say is missing is having Unity detect the extents of the lever and make something happen. So if you pull it all the way down, have it play a sound and invoke an event that other game objects can listen to.
@ValemVR4 жыл бұрын
Hi my man, check the pin comment I made I attached a script that does exactly this job! :D
@GwynPerry4 жыл бұрын
@@ValemVR yep, that's great. I noticed it after I commented.
@taxemicspark2 жыл бұрын
This video has helped loads with my current project, even though I'm using a more updated version.
@simonthedigger994 жыл бұрын
love the series man im working on my final year project and decided to build a VR racing game and this series is really helping specially this video keep up the good work
@toddandlar73593 жыл бұрын
I've been subscribed for awhile but have really been out of coding VR for awhile. Since playing half life VR I have been waiting for a proper implementation without any crazy hacks for doors and drawers and such. This is so much awesome I can't thumbs up enough. Thank you!
@Ciroisnthere2 жыл бұрын
THANK YOU I'm not making a vr game but it still helped me ALOT in pc gamedev
@sparkarg6774 жыл бұрын
Hi Valem, I don't know wheter you will read this or not, but i do really thank you for all of your videos. My final degree project was made with VR and didn't know almost anything, and all your tutorials have helped me a lot. As soon as I find a job, i can ensure you that you'll have another patreon subscriber ❤︎.
@THOMASXDXDXDXD4 жыл бұрын
Excellent video, Valem! This series is definitely the best about Unity XR Toolkit I've seen on KZbin. Thank you!
@Louuloutre4 жыл бұрын
I want to say thank you so much for all of your tutorials it helps me A LOT ! Mercii fois 1000
@rikusoulz4 жыл бұрын
You are really doing a really good work, keep doing this, you help a lot of people!
@Ctorresification4 жыл бұрын
Awesome tutorial Valem! Might I suggest a tutorial for climbing next? Or snap placing grabbables? Like a magazine into a gun, or a key into a lock?
@adhochero66194 жыл бұрын
hey @Valem thanks so much for the tuts. i was able to use the hinge joint on the lid of a pirates chest. i also added a rigid body to the bottom part of the chest and set it as the link rigid body for the joint, that way when i can pick up the chest to carry it around and also if i grab the front i can open it up with the joint. it works great.
@JTHBS4 жыл бұрын
A whole tutorial without coding :O unbelievable :D
@jaredmiller72574 жыл бұрын
Can you please make a videos about guns.. like ammo, reloading, and ammo clips
@max109y4 жыл бұрын
Nice tutorial these help a lot and im glad u teach them in Unity! 👌
@4vrstudios4 жыл бұрын
You are the best! Thank you so much for helping us!
@andrewdowns47774 жыл бұрын
Love this series, man. Keep it up!
@EazybakeTV4 жыл бұрын
Great Job! This will be very useful for me in the future.
@boulderplayz67124 жыл бұрын
Hey valem! I REALLY wanna make a grappling hook in my brain game. It would be amazing if u could do a vid cuz ur format is really easy to understand
@CosmicComputer4 жыл бұрын
Valem you are awesome, thank you!
@asodesu_4 жыл бұрын
You deserve more subs
@JackTYM4 жыл бұрын
9:07 THE ULTIMATE DANI AND VALEM CROSSOVER
@meeperhere3 жыл бұрын
ye
@DmitriyChaban-dmi3coder4 ай бұрын
Spent 6 hours with chatgpt trying to make this lever, found your video - 5 mintutes - resolved. One tip for those who're stuck - don't put the rotation inside the floor, otherwise it'll bounce back
@nicolasenriqueruedarincon469 Жыл бұрын
Lever tutorial starts at 6:15
@yolokas4 жыл бұрын
What are the differences/benefits for using unity XR instead of Steam/OpenVR ?
@_Garm_3 жыл бұрын
what an awesome tutorial! :D
@adhochero66194 жыл бұрын
aye, cool stuff man, thanks
@LiquidCurtain4 жыл бұрын
Great series! I keep coming back to these videos every time I have a problem. Is there any easy way to force a controller to release a held object? I'd like to be able to disable or destroy an item after the player uses it, but I can't as they are still holding it.
@PhantomWolf934 жыл бұрын
How can I make the player stop grabbing the door if he is walking away? The door even breaks if I grab it and move too far. Thanks for your videos!
@WaffleCat3 жыл бұрын
Heya, I have the exact same issue now. Have you maybe found a fix yet?
@valentinsourice37803 жыл бұрын
We are several with the same issue (mainly lever / door stabilty) we opened some thread on it (KZbin does not let me put the link...), you can find us by taping "xr plugin grab hinge joint" on Google.
@ramkeshsingh40512 жыл бұрын
Hi , Please make tutorial to make spaceship simulation .
@M_Ryze3 жыл бұрын
My Grab Ray Ignore layer won't work. I disabled body to grab ignore, but the ray still shows up and interacts. Edit: Fixed! select both (left/Right) Ray Interactor(s), go to XR Ray Interactor and go to Raycast Mask, disable everything first, then enable UI, and Grab.
@alexmartos91004 жыл бұрын
Best tutorials ever!!
@wtfimcrying4 жыл бұрын
hey valem! good video but can you possibly make a video about simulating weight in vr and giving your player weight similar to boneworks? just a suggestion.
@lukenowlandfilms4 жыл бұрын
Thank you. THANK YOU.
@jesco_xr4 жыл бұрын
Hey @Valem, do you remember how you made the tutorial about extending the OVR Grabbable to work with Hand Tracking and the normal OVR Grabber. Any chance of doeing an extension script to the Unity XR Toolkit? :)
@FynnGB4 жыл бұрын
I would be really interested in the hand tracking integration as well! I heard that it is not compatible with the xr interactive toolkit yet and I'm curious to see a work around or a proper implementation if it exists yet
@andriy_z2 жыл бұрын
Thanks!
@Mex-ge9kj4 жыл бұрын
I really need to know how to make vr enemies and vr portals for quest, cuz I'm gonna use them for a test game I'm making.
@TheRedMC4 жыл бұрын
I don't know if you're still looking for the help with this at all, but VR enemies and regular 3D Unity enemies wouldn't be that different. You could likely use some regular Unity tutorials or something.
@Mex-ge9kj4 жыл бұрын
@@TheRedMC ok, thanks!
@danielgalli67604 жыл бұрын
thanks you so much valem for your tutorial, you are doing something that anyone is doing! i got a question, how you will deal with the drawer or the door to dont get clunky or jittering when you hit with a object like the gun or the ball? i dont want to change the layer, i like the "freedom" of close te door using the gun for example.
@DenisGamer4 жыл бұрын
Hi Valem, I have been researching vr, and have come across resources to develop, i need some advice. Do you recommend using the OVR Oculus Integrations together with VRTK or is it better to use the XR resources from this tutorial series? Does it depend on my target platform?
@fresoapa4 жыл бұрын
Actually, the InteractionLayerMask is a bit confusing and it doesn't help the documentation is wrong. Looking at the code, it doesn't care about the GameObjects layer, but just misuses the layers for its layer mask. It is better to think like this: * For interactables: Flag the object for what kind it is. - Gun should be pickable directly and remotely and slottable into inventory: Set Interaction Layer Mask to RemoteGrabbable, DirectGrabbable, Slottable. * For Interactors: Flag the layers that should work with this interactor. - RemoteGrabber? Set mask to RemoteGrabbable only. - Inventory socket? Set mask to Slottable only. With this thinking, you don't even need to change any layers in the game objects. Everything can be set to default. At least regarding XRIT interactions.
@m1dn1ghtfury2 жыл бұрын
@Valem thanks for your tutorial series on how to setup a basic VR project in unity, I've found it extremely helpful and informative and as I'm new to XR development your videos are a godsent. I do have one doubt though, when I attach an XRGrabInteractable component to the door with the Collider as door handle, for some reason I can still grab the door from anywhere on its body. Do you know how to fix this
@thebutterappletutorials65534 жыл бұрын
Are you going to make a video on 2 handed weapons/objects?
@Ziboo304 жыл бұрын
Awesome video thanks ! I'm trying to do a turn table, or a valve and have difficulty. Any chance you could do a video on circular interactables ? also push buttons :) Thanks !
@lucasmartinic20394 жыл бұрын
Yes that would be awesome, have you had any luck with this Robin?
@Ziboo304 жыл бұрын
@@lucasmartinic2039 I rewrote the all XR interaction system ^^ keeping just the low level stuff.. wasn't suitable for my needs...
@stevencraft71443 жыл бұрын
The offset grabbable stuff doesn't work very well, from what I can see anyway. If you grab the drawer and then rotate your hand (without moving the position of it) the draw moves in and out, and when you release you'll see the drawer is in a completely different position to your hand? The door behaves somewhat similarly, but on top of that, simply moving the door, the movement isn't mapped 1:1 to your hand, so you move your hand a small amount, and the door moves a lot. If I switch back to using the default (non-offset) grabbable, all this is fixed, but you get the jump/snap when interacting.
@MaxximaUnitysurabaya Жыл бұрын
Hi, a question. Using hinge joint if I try to pull away farther than where the object is supposed to be, it will then move frantically like a possessed person. Does the script that you gave in the comments counters that, or is there another script needed to handle it?
@Trivimania4 жыл бұрын
Maybe a strange question, but in the video you grab a drawer. Where could I plug in a piece of code to execute whenever the drawer is opened ? Is there some kind of event system for that or so I actually have to add a script to the drawer that constantly checks its position in world space ?(using a lot or cpu power)
@richardosborn1593 жыл бұрын
wow, thanks!
@zachdavis66242 жыл бұрын
super helpful but can you make one using configurable joints and a joystick?
@Tinotin124 жыл бұрын
Make a tutorial on how to interact with an object in your hand by pressing A, B, X, or Y on the controller.
@jaredmiller72574 жыл бұрын
I 2nd this
@JackTYM4 жыл бұрын
all you have to do is change the Trigger/whatever on the Hands to whatever button you want instead of trigger/grab
@rocketjumper54193 жыл бұрын
I am stuck on the drawer section, for some to me unknown reason I can push the drawer through the back wall of the cabinet. Is there anyway to fix this?
@LuisGonzalez-ot5cg3 жыл бұрын
yo fr did you fix this??
@danielgarciagonzalez23914 жыл бұрын
Oh man, if only you could show how to create buttons that don't rely on gravity and yet the button animation works with VR hands, now that would be the OG.
@KaineReiN4 жыл бұрын
Hi, Valem. Can you make a tutorial on how to customize object in-game? Like when I select a ball and a menu pops up on my hand and I can customize the ball's texture, color etc
@jasonallen63303 жыл бұрын
I got all your different joints to work. However I would like to see a tutorial on how to make twist nobs. I thought at first they would be like tiny levers. They seem to be a bit different to me than that. Any ideas?
@tylerstyle3073 жыл бұрын
Which video does he explain how to make the XR Offset Grab Interactor?
@jotadani00763 жыл бұрын
THANKS!!!
@peterschreuderr2 жыл бұрын
When you are using the "grab offset" script. Dont use the AttachTransform value, things break because of that!
@appleslice91424 жыл бұрын
Need a tutorial on how to change the default hand models.
@xxfrizzzerxx68903 жыл бұрын
I LOVE I LOVE I LOVE
@alpha37634 жыл бұрын
Do you have any plans on making a multiplayer tutorial?
@ValemVR4 жыл бұрын
Yes i do! :) not sure about the timing but its on my todo list
@emanuelevetere53112 жыл бұрын
Hi everybody! Somebody can explain me why when I add box collider to the drawer it start to move itself???
@vidyasagarsamudrala68404 жыл бұрын
@Valem any chance can you create video on Steering wheel with oculus Controllers grab and steer??
@ElSolitarioPerpetuo Жыл бұрын
Hi, there are a way to do this with the last Oculus SDK components ? :c
@andrespena20053 жыл бұрын
When did he make the XR Offset Grab Interactor?
@kingfhd24244 жыл бұрын
Make enemy make enemy!!! By the way nice vid
@nougat44162 жыл бұрын
If i grab the door handle and walk away the doors disconnects from the hinge and spins around. If i let it go it goes back in place. What have I done wrong?
@NP-cw6zk4 жыл бұрын
Can you make tutorial to make Optimize Mirror for XR? Please
@Hello-rh4zw2 жыл бұрын
This is going to make me sound stupid (Probably because I am) but in every one of your wonderful tutorials, if there is code, it does not work. I have tried writing it and using what others have put in the comments and it never works... I am using version 2020.3.25 but almost everything else works. Will this work If I switch versions? Is there something I am missing? Thanks to whoever is reading this!
@simonthedigger994 жыл бұрын
im really curious about the lever u made is there a way i can trigger something by pulling it how would the triggers work would be glad to have a tutorial on that
@ValemVR4 жыл бұрын
Hi man yes you can! I post a script to trigger an event when the lever rich its max value its really simple and works well
@simonthedigger994 жыл бұрын
@@ValemVR that's very cool thanks dude I'm actually working on a steering wheel in a car so I'm thinking the more I turn the wheel the more the car turns as well
@flipwon21994 жыл бұрын
How about holsters for items?
@jaredmiller72574 жыл бұрын
I 2nd this
@tommyford13013 жыл бұрын
From way back in the Grab Interaction Video the OnSelectEnter in the offset grab code seems to be OnSelectEntering now i had a few issues with it still snapping cause of this with the drawer
@hugodigio8027 Жыл бұрын
I try do this on my current project, but i don't have a good response of my movement when I try to open/close the door :( the feeling is not good, it feel like the door is heavy ... I notice that the movement is more accurate when I rotate my controller same time ... but not very smooth and ergonomic
@FireChicken74720 күн бұрын
It is behaving very strangely for me. I Had to put on both colliders set to trigger because it would glitch out but when i got it working. It would behave weird. when i grabbed it, it doesn't read with the forward or backward motion but rather me just spinning my hand. Does anyone have a fix for this?
@wade0652 жыл бұрын
May I ask why the door will be pulled out when the controller is backward?
@Individ19843 жыл бұрын
Thank you a lot!!! But i dont get, why my box dont stop when i closing drawer :( I think its linear limits in + and - at same time.. if i set 0.4 to linear limit that means +0.4 and -0.4..
@mirakuru6298 Жыл бұрын
I don't have this visual gizmo edit "Edit Angular Limits". How to enable this? I googled but I didn't found the answer, why don't I have this?
@mrslake70963 жыл бұрын
Thx
@nathantripodi Жыл бұрын
I dont know if it is in another video or if I'm just missing something but my hand does not seem to disappear when I open the door and infact you can see it no where near the door handle (When the player moves) ASWELL as being able to move far away while "still holding it" and then the door spazzing out.
@nathantripodi Жыл бұрын
Also, what video is it where you create the body layer to stop the objects from pushing the player?
@MuscleDoraemon2 жыл бұрын
Your video is helpful. However, I met a problem when trying the lever. The lever always will come back to zero. It will not stay on max and min limit. Even though I adjusted some values, it only reached max limit, and it still does not reach min limit. What should I do?
@kanchanasaravanan814210 ай бұрын
Hi i dont have body in my layer. even if i create a layer where should i assign them
@dansv97784 жыл бұрын
I have so much fun following your series ! But i'm really stuck with the jittery of the object that i grab when i move
@serpnta12674 жыл бұрын
Did you change the time in the Project Settings to 0.01111111 in the Fixed Timestep area?
@kingfhd24244 жыл бұрын
But Waittttt if we want to pull lever to open door or make something how?
@ValemVR4 жыл бұрын
Hi Cheese Burger ! I posted in the pin comment on this video a code that will do the job for you ! :)
@vardanpetrosyan32594 жыл бұрын
9:05
@RagnarGaming28013 жыл бұрын
Hi man, great work. I am trying to build a mounted gun. I have a handle which controls horizontal and vertical rotation. But when i try this by having hinge joint on parent and child and hand is child of child. Couldnt get it working. Can you help ?
@HenshinAsset3 жыл бұрын
What if you want to only be able to rotate a object while hand is holding something on the same object e.g. turn a handle only while holding the box
@juanjotorres3 жыл бұрын
Hello guys! I am enjoying this tut as a child. I have some troubles with my own importing assets, for some reason it has a weird behaviour when I do the action of opening and closing a door from a furniture. I downloaded Val's asset, I tried and it was succesfully good but not in my case (with my own props). The door starts to move randomly to all directions. Can somebody help me pls?
@10YearBall4 жыл бұрын
Can you do A tutorial on how to make an asymmetrical game