Hey guys ! I made an update of this series on my channel Valem tutorial that you can find here : kzbin.info/www/bejne/nH6TnGWkbNprqcU
@sotogje4 жыл бұрын
You are always suprising me offering the exact tutorial I am looking for
@jordyatondo10044 жыл бұрын
Ikr, I literally needed this yesterday, lol.
@AdrianMeredith4 жыл бұрын
this is great! how about some enemies next? would like to know how to physically interact with another character with that lightsabre?
@magnusthomsen4504 жыл бұрын
Thanks Valem 😁
@mironco95954 жыл бұрын
Yay! I really like this series! Thanks for another episode
@riska52p4 жыл бұрын
I love this series
@nein_33714 жыл бұрын
i realy like how motivated you are in every video :D
@Rickmanx19724 жыл бұрын
Another excellent tutorial! And it is funny... I was about to work on creating drop zones for attaching swords and potions to a belt, but you saved me a bunch of time. Thanks again :)
@RigidDecay2 жыл бұрын
Thank you so much! This helped me with my holsters, I love how it is extremely simple and intuitive.
@samcasters4 жыл бұрын
Woudnt you be able to put anithing 9n your head is there a way to make it so you kan only put things on your head with a specific tag
@charlottedegooijer45363 жыл бұрын
A bit late, but for anyone still looking for this. Check out his second tutorial on creating a realistic gun, there he gives a script to extend the socket interactor with a tag.
@Kazumo3 жыл бұрын
@@charlottedegooijer4536 Thank you!
@LivanderGamedev4 жыл бұрын
This is what I've been waiting for!
@richardosborn1593 жыл бұрын
thank you for this high-quality info
@dimashutama93782 жыл бұрын
how TF did you not get 1M view?, this tutorial is very good and explained really well.
@curranh.83284 жыл бұрын
You are very skilled. Great tutorial! Thank you for bringing this to the masses! 😁
@silwerifpv83954 жыл бұрын
Thank you for this excellent tutorial series! I'd like to report a bug that I found with XR Interaction Toolkit with URP on oculus go. Same issue might be with quest? XR Socket interactable is not working when project is using URP. Could you test this project on quest and see if the same bug remains?
@silwerifpv83954 жыл бұрын
Found the bug in XRSocketInteractor script on material creation on lines 74-88. After replacing the lines 74-88 with below code, the snap zones work on Oculus Go (possible issue on Quest too?): if (m_InteractableHoverMeshMaterial == null) { // create of default transparent shader var m_InteractableHoverMeshMaterial = new Material(Shader.Find("Universal Render Pipeline/Lit")); if (m_InteractableHoverMeshMaterial) { /* m_InteractableHoverMeshMaterial.SetFloat("_Mode", 2); m_InteractableHoverMeshMaterial.SetInt("_SrcBlend", (int)UnityEngine.Rendering.BlendMode.SrcAlpha); m_InteractableHoverMeshMaterial.SetInt("_DstBlend", (int)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha); m_InteractableHoverMeshMaterial.SetInt("_ZWrite", 0); m_InteractableHoverMeshMaterial.DisableKeyword("_ALPHATEST_ON"); m_InteractableHoverMeshMaterial.EnableKeyword("_ALPHABLEND_ON"); m_InteractableHoverMeshMaterial.DisableKeyword("_ALPHAPREMULTIPLY_ON"); */ m_InteractableHoverMeshMaterial.SetColor("_Color", new Color(0.0f, 0.0f, 1.0f, 0.6f)); }
@adhochero66194 жыл бұрын
@@silwerifpv8395 yes this is an issue on quest if you run the game it just not there no sockets whatsoever
@kennl664 жыл бұрын
@@silwerifpv8395 Thank you so much, this fixed the issue with XR Socket Interactable not working with URP :)
@renmiao2964 жыл бұрын
I also found this issue on Oculus Quest. Thanks a ton for finding the bug and the fix! I was about to remove URP from my project but with this fix I will continue with URP! Also I am not sure if we need to comment out those m_InteractableHoverMeshMaterial setters (between /* and */). I left them in, only changed var m_InteractableHoverMeshMaterial = new Material(Shader.Find("Standard")); => var m_InteractableHoverMeshMaterial = new Material(Shader.Find("Universal Render Pipeline/Lit"));. Apparently Unity team forgot to change this line of code (still trying to find Standard shader). With this one line code change Socket Interactor works as expected on Oculus quest.
@TheRedMC4 жыл бұрын
@@silwerifpv8395 Thanks for finding this fix, dude!
@MichaelSchubertPhoto4 жыл бұрын
Hey Valem really enjoy your tutorial. One question considering Socket Snap Zones in XR. Is there a way that I restrict my snapping zone? So my Gun has a specific Snap zone that no other object can snap to. E.G. via a Tag. So only a Gun with a "Gun Tag" and the Snap zone with the Tag "Gun Snap" can work/snap togehter? Would be nice to have this additional info.
@snufkrill3 жыл бұрын
A year late but in the xr socket interactor theres a tab that says interaction layer mask, set it to the layer u want and only objects within that layer can snap into it.
@meeperhere4 жыл бұрын
Valem: only uses box colliders and sphere colliders Mesh Collider: Am i a joke to you?
@PhantomWolf934 жыл бұрын
The Mesh Collider is more accurate when it comes to establishing collisions, but on the other hand it can give problems and inaccuracies when Unity has to calculate its physics. Whenever you can, use a box collider.
@A_C_0074 жыл бұрын
@@PhantomWolf93 I feel like whenever I have a problem with collisions being detected it is because I'm using a mesh collider, way less problems with the other types. Idk what the problem is.
@meeperhere3 жыл бұрын
A Convex Mesh Collider Will Work Though
@stevencraft71443 жыл бұрын
It wasn't entirely clear to me what the follow math was doing, but to me, if you want something which basically follows your position and direction you are facing, and offsets but only taking into account Y rotation, I'd do something like: transform.rotation = Quaternion.Euler(0f, target.transform.rotation.eulerAngles.y, 0f); Matrix4x4 m = Matrix4x4.TRS(target.transform.position, transform.rotation, target.transform.localScale); transform.position = m.MultiplyPoint(offset); This seemed to work for me (it gave me inventory slots which were always below my head, around my waist, on the left and right.
@Dunzz1004 жыл бұрын
Gracias c: tus videos son de mucha ayuda.
@sambrown24274 жыл бұрын
Thanks again for the tutorials. I would love to learn how to make the snapzones not scoop up items I pass by. I only want items I place in them via hover to get grabbed. I've tried some solutions with no success yet.
@adgjl8224 жыл бұрын
Can you do a video like "how to make a body in VR" but with Unity XR now?
@DodgeThePie4 жыл бұрын
its the exact same
@filipbursik96353 жыл бұрын
That's great, nice tutorial!
@austinheydari18133 жыл бұрын
keep up the good work ! thx for the tutorial series 👍🙂🙂
@doriondouglas61764 жыл бұрын
How do you make it so only one specific object can be put into a drop zone? Like with the hat, you could put anything on your head. I wanma make a key system but I dont want a gun in there. I guess I could just use a function that checks if its that exact object, but you will be able to put anything in there.
@Mtech77524 жыл бұрын
I guess you can just play with the layers. Look at the "XR Socket Interactor" component of your DropZone. You can chose the layer it is interacting with.
@Mtech77524 жыл бұрын
Okay I just did it. Follow my steps. Lets say I want to make a holster for my Lightsaber. And the light saber will be the only thing I can attach to it. 1) Create a dropzone like in the video. 2) Create a layer called "Light Saber Holster". 3) In the "XR Sockets Interactor" component of your dropzone, there is a line called "Interaction Layer Mask" wich is set to "everything". Put it to "Light Saber Holster" only. 4) Now look at your Light Saber. It has a component called "XR Grab Interactable". There is the same parameter called "Interaction Layer Mask". It is set to "everything". You will notice you can attach your LightSaber to your Holster just like that. But, we dont want any other object to be able to attach to that holster. Here is the trick. You have to change the "interaction layer mask" of every other object to uncheck the layer "Light Saber Holster" that we created. It is a bit long, but in the end its very effective. Because you dont have to change the layer of any of your objects, just the layer mask. If not, you wouldnt be able to grab them anymore. Tell me if you have a problem.
@garlicsuter4 жыл бұрын
@@Mtech7752 I'm trying the route of a custom function so I can just check the tag of the object being held in the snap zone, but I can't get it to work, it just says NOT A FOX everytime even if it IS tagged as "fox": public void IsItAFox(Collider other) { if (other.tag == "fox") { Debug.Log("Yes, it's a fox hovering"); } else { Debug.Log("NOT A FOX HOVERING"); }
@doriondouglas6176 Жыл бұрын
@@Mtech7752 hey just found this comment 2 years later. I appreciate you going through and doing it (youtube never gave me a notifcation so i never knew! haha) but thank you for going through the effort, it is much appreciated.
@MrRansuil3 жыл бұрын
Lol, I had a cool bug where the door and drawer from the previous tutorial are grabbables, and so when I opened the drawer it would collide with the inventory dropzone that was following me around and completely break the physics!
@gamerpros4133 жыл бұрын
Did you fix it? I have the same problem.
@MouiTV4 жыл бұрын
Great videos! It would be great if you could make a video showing how to replace the hands in steamVR into custom ones, there is very little information on how to do this and seems quite difficult!
@devincollins48044 жыл бұрын
This is great! I always check my feed for when you release new videos! Is there a way to connect this snap zone functionality to a trigger? Say, inserting a card to open a door?
@borkly79264 жыл бұрын
Can you teach climbing next? Great vid btw!
@sauravshrestha18902 жыл бұрын
This is awesome!!
@AlexBrigham4 жыл бұрын
Hey Valem, thank you for all of the work you've done on this series. I used to make GearVR games, and took a few years off. Now getting into Quest development with the help of your tutorials. I was wondering if we could see how to make functions that respond to the Touch Triggers being held down. Like a gun that charges while held down, and shoots on release. It doesn't seem like there is any equivalent to "GetButtonDown(0)" for the touch controllers. Thanks again!
@spidernh4 жыл бұрын
Yeah I wish you could just do something like "Input.GetAxis("LeftTouchControllerTrigger");" I just had to make my own input manager and get the variables that has for each input from other scripts.
@JackDontLie4 жыл бұрын
Thanks valem! :)
@ndonkey4 жыл бұрын
Hey I'm having a bit of an issue. On your code when i walk by the draws the the draw and door get sucked up into the inventory slots. I have tried making a couple of changes but seem to make it all work or all break :D Is there anyway to set it so only certain layers can use the inventory or the object has to be held in the hand and dropped before being added to the drop zone?
@rikusoulz4 жыл бұрын
Did you manage to solve it? I'm using the Interaction Layer mask to do it but you have to do it on every grabbable item
@ndonkey4 жыл бұрын
@@rikusoulz I some what just got around it. From memory I put the inventory areas into a new layer and allowed them to interact with standard grab items but not the doors, draws, levers, etc. It worked for what I wanted and it meant nothing else needed changing.
@adhochero66194 жыл бұрын
Hi this tutorial is great and everything working when testing in unity though the link. but when i build and run it to my quest headset, the socket stuff is just gone it no visible socket zone on hover no predetermined object in the slot nothing. has anyone else had this problem. everything else works, even the climbing, just not the sockets.
@philipp2824 жыл бұрын
I have the same problem. Did you find a way to fix this?
@jacobfoster93584 жыл бұрын
How about a tutorial on how to make an object grabable with both hands at once?
@adhochero66194 жыл бұрын
this is what i need. i have already tested it with the OVR stuff i have a working two hand rifle. but i just dont know how to use two hand holds with the XR toolkit.
@autumn_id4 жыл бұрын
@@adhochero6619 Hey, I just found exactly what you were looking for. There are three videos that can help you out with doing two handed weapons / objects. Check them out! Here's the link on the first video, I hope it will help kzbin.info/www/bejne/f4mVdoh3mNSWpa8
@mario123mario1233 жыл бұрын
He made one :) Part 10 ;] kzbin.info/www/bejne/f5aTXqKBg5h_p5I
@Zyymk04 жыл бұрын
Keep it up 😛😇
@Frenoir2 жыл бұрын
do you have a video for OVR and oculus quest 2 not using XR interaction toolkit
@wrath66924 жыл бұрын
Nice thank you for the tutorial c:
@iuel423 жыл бұрын
Valem I have a problem - When I use the socket interactor with an object that has the offset interactable instead of the standard one, the attach transform doesn't work. Is there any workaround for this? Thank you in advance if you reply.
@productreviews22223 жыл бұрын
I am having the same issue, it grabs the object but won’t let me set the location
@kortalian2 жыл бұрын
Same issue here. Did you ever figure out how to use an offset grab with the socket?
@blissofkundalini4 жыл бұрын
Another mind-blow! Haha!
@piotrt.36524 жыл бұрын
Hello, Valem thanks for this amazing series! I have one question maybe you know by any chance how to programmatically force interactor (hand) to put some interactable (let say ligthsaber) in hand and then also programmatically remove it from hand (direct interactor)?
@eliassillen61074 жыл бұрын
Next tutorial idea how to make a sword attack an enemy or something like that
@spidernh4 жыл бұрын
That's just normal unity stuff, nothing specific to VR really. Except for that you're experiencing it in VR. Just take a collider and when it touches the enemy make the health go down.
@kennl664 жыл бұрын
Is the XR Socket Interactor broken in Unity 2019.4.1f1? Mine is not grabbing anything i put in the sphere, it just falls through. I have a sphere collider set to trigger and added the XRSocket interactor but it's not working. (FIXED) read SilweriFPV comment here, has a fix for the XR Socket Interactable not working with URP. I just tested it and now works on the Quest.
@polar19914 жыл бұрын
Do you have any experience with unreal engine? If you do can you make a series on it?
@bones999994 жыл бұрын
Great Tutorial. Can you snap multiple objects to the one point if they are different heights?
@TimT264 жыл бұрын
Please someone help me! I can drop object in mu dropzone, but I can't take them out of the dropzone. Can somebody help me?
@ValemVR4 жыл бұрын
hi Tim, do you have an error showing in the console ? :)
@TimT264 жыл бұрын
Valem Hi! No, I don’t have an error. It’s like when the object (Unity cube) is in the drop zone (sphere), it seems like they just don’t collide. I’ve done just as you did in your video. I’ve checked the collission matrix, but there is everything is normal there
@doriondouglas61764 жыл бұрын
@@TimT26 have you checked is trigger on the sphere collider? As in the drop zone collider?
@andra98123 жыл бұрын
@@TimT26 have you fixed it ? I have the same problem
@Duckamoly4 жыл бұрын
Dani *uses your tutorial* his subscribers *SUBS TO VALEM OUR AMAZING VR LORD*
@rcalastro04 жыл бұрын
Is there any easy way to resize the object inside the socket without having to extend the XR Socket Interactor? I tried to resize the "Attach Transform" scale, but it didnt work. Looks like the attach transform is used only to get the position and rotation. Thanks in advance! Valem your videos videos are awesome!
@JoseDaniel_Acosta3 жыл бұрын
THANKS! :D
@ellacouch87234 жыл бұрын
Can you plz make a video about locks and keys and maybe number padlocks?
@themirlabs3 жыл бұрын
Would it not make it easier to child the obj to the head with the offset?
@nikolatotuhov4 жыл бұрын
Hey is it possible to make the dropzone look like the object which needs to be grabbed?
@niklashilger91724 жыл бұрын
What i have to do to add in the "FollowToTheSide" Script, that i can adjust the rotation of the Drop Zone?
@sn00ltheog454 жыл бұрын
Hey I was just wondering if there was a better way to track grabbed objects as I like the physics collisions of the velocity tracked movement type but I don't like the jittering when moving whit continuous. Is there a better way of doing it?
@rikusoulz4 жыл бұрын
Very nice job! Just one question, just noticed that if I have the two inventorys (left and right) when I continuous turn, I see like with less fps and is not fluent, not SMOOTH and If I disable the two inventorys changes and has a smooth turning move. Any way to solve this? I really want to have inventory and a normal turn, not stuttered and the only hint I have investigating is that is caused by the "Follow To The Side" script, that causes the turn to be less smooth
@francescomaddaloni92173 жыл бұрын
any idea how to do it with the standard oculus integration?
@gabrielcharlessanchez67299 ай бұрын
Can I apply this in 3d not vr?
@amadra8264 жыл бұрын
Imagine making an inventory out of this
@nepal41904 жыл бұрын
hey, do you know how to make a working spin the wheel in vr?
@grandobsidian3 жыл бұрын
ive spent about two hours trying to replicate this and I cant actually get anything to snap into the socket or even seem to register a collision
@n.vano.75294 жыл бұрын
Merci pour tes vidéos que je découvre en ce moment, dommage qu'elles ne soit pas en français 😉 signé : un camarade de Bxl ✌🔥!!!
@devariiii4 жыл бұрын
Is anyone else getting an InvalidOperationException: Collection was modified; enumeration operation may not execute error whenever they put something inside of an XR Socket Interactor?
@mrslake70964 жыл бұрын
Thx
@athir33242 жыл бұрын
Hi . I follow all steps but still the snap not working for me
@chowwill98283 жыл бұрын
Why is my snapzone can sometimes put the things in, sometimes not??
@Ss-kk4ep4 жыл бұрын
My object enters the ball but when I want to take it out it stays there it does not connect to me at all does anyone know what the reason is?
@andra98123 жыл бұрын
I was searching for this comment cuz i have the same problem. Any solutions ?
@mohammadrazakhan38523 жыл бұрын
How to make sound when the controller hits any object ? Can any one help me please ?
@heldoct61544 жыл бұрын
Can u make VR android with controller? Not use oculus but other controller??
@hamzamellahi36494 жыл бұрын
where can i find these assets?
@emiltoczyski2604 жыл бұрын
The socket interactor doesn't work when you build the game ):
@nace68494 жыл бұрын
Hey valem, maybe you know the KZbinr Dani (he has 1 mill subs) and he used your tutorial lol
@vikramsindhu59012 жыл бұрын
I am just gonna say this You should do udemy course with the latest content and a project within it that'd be great
@smarter46454 жыл бұрын
Regarding the script for the movement of inventory slots with the character. If u want it to follow in the same manner as "CapsuleFollowHeadset" from previous tutorial, replace the FixedUpdate with this: void FixedUpdate() { transform.position = characterTransform.TransformPoint(character.center); transform.eulerAngles = new Vector3(0, VRCamera.eulerAngles.y, 0); } i did not include the offset because I just need this for inventory slots around the belt of the player, for me orienting the gameobject is enough since I track the height. I placed three sphere objects with the socket component under an empty game object that has the script with the code above. Hope it helps. Btw, if anyone knows how to make the whole character not go through walls please let me know, the code from the tutorial series did not work for me.
@Corysia4 жыл бұрын
Yay!
@meeperhere3 жыл бұрын
the objects fly away
@aminer3v6954 жыл бұрын
Are you french ?
@Doggie544 Жыл бұрын
If this works and don’t waste 20 minutes of my time you a big saver❤