STEAM VR - The Ultimate VR developer guide PART 2
Вставка
- Опубліковано 11 вер 2024
- ▶ Support the channel on Patreon : / valemvr
▶ Join the discord channel : / discord
I’ve condensed into two videos everything you need to know about SteamVR and you are watching the second episode of this new tutorial serie. In today’s video I’ll show you how to grab, throw, snap an object. Then, we will use what we learned to grab a handgun with a custom pose and shoot with it.
TIME STAMPS :
0:37 - Interactable Object
6:05 - Throwable Objects
9:41 - Snap Object with Handgun
11:45 - Using Grabbed Object / Shooting with the handgun
14:43 - Custom Hand Pose
Download the Old Revolver 3D model : opengameart.or...
#unity #vr #steamvr
Here are some time stamps for those who you want to jump to a particular part of the video 👍
0:37 - Interactable Object
6:05 - Throwable Objects
9:41 - Snap Object / Grab Handgun
11:45 - Using Grabbed Object / Shooting with the handgun
14:43 - Custom Hand Pose
Valem could you do a video we’re you show us how to make a working bow an arrows please
THANK YOU SO MUCH FOR THIS TUTORIAL!!
I have a question. How do I get the height of the player? I can not find it. Thank you in advance
could you attach the code written in the video?
This is full stop the best tut I've ever watched.
when I first started watching this series, I was really confused why we wanted to see ends in VR, but now that I am used to hands being ends, these videos are really helpful :D
Cool video, can you please make a Tutorial to holding objects with both hands (for example a sword or a rifle) (Sorry for my bad english )
I'm having a hard time using steamVR and this show up.
perfect video came up at the perfect time
thank you
Thanks for the tutorial, completed the first part, can't believe it's free!
your videos are amazing! something I cant figure out for the life of me or find online anywhere is adding in your own custom rigged hand and setting it up to work with the steam VR stuff! If you know how this is done please show us in the next video! c:
Saw the notification, can’t wait to watch it!
Give this guy a medal. Perfect tutorial with no bullshit but all the important details show. 100%!!a
A little disappointed that we didn’t get as much guidance on where the bullet and muzzle flash game objects came from. I was able to replicate the script, but without the correct game object my tutorial crashes. Any ideas?
Amazing video, would it be possible to do a tutorial about 2 handed grabbing objects as this is something which is extremely hard to find!
this is were we were all being waiting for !!!! thankyou very much !!!
Thanks for the great guide video.
I am Japanese.
This video does not seem to have automatic subtitle settings.
If you can, please set automatic subtitle settings.
It will be automatically translated and I will be able to understand it.
Please keep making these! You should make mini-game tutorials for VR, like things that could be adapted to multiple types of games.
+Valem 11:20 I had 2 problems with that
1- when I set up my right hand grab position with the "Grab offset" game object it works fine with the right hand just like ur but I tried to pick it up with the left hand it snapped a bit far away from the fingers ( like 2 inches away from left hand but perfect on the right hand )
2- when I set up the snap flags just like u did 11:27 it kept wiggling and vibrating so fast and everywhere, On my scene when i moved my hand a little bit to the left and the right it left my hands and hit the balls off the table when i stopped it returned back to my hand but was still shacking and wiggling ....
Unity : 2019.3.7f1
steamvr : 2.5 ( i think )
hey, wondering if you ever found a solution to the second issue. Thanks!
@@attacksalad2996 yeah, I didn't use steamvr instead I made a new custom system that worked with steam and other platforms
It could have been nice to see how you made the bullet and the muzzle flash, since I cannot find that anywhere.. The pistol, when downloading comes with a the loader stuck behind the pistol.
How did you remove that?
u find a solution?
@@joseftember4180 Sadly no, sorry. :(
Can you short explain how the Barrel Pivot and the Bullet is made?
Hey, thanks very much for your guides, they are super helpful and the pacing is great! Any chance you could do something that covers the player collider system in Boneworks? Specifically, so that if the player attempts to look through a wall it pushes them backward. Keep up the great work!
Thats can be done quite easily with simple logic. If head collides to wall, move player or whatever.
So in the video before this, he created a character controller component in the player that holds a capsule collider (Pretty standard stuff). He actually posted a comment to his own video if you scroll down far enough that contains a script to have the collider follow the head position within the play area. This achieves the effect you're going for.
Im wanting to make a game like boneworks, it has been a while since this comment and the game came out, but I believe that there aren't enough games like it, but I can't figure out most stuff.
Thank you so much for your videos. I like that you show in game what happens after each change so people can see the result of each change. Is there a setting in Throwable that allows me to attach the gun to my hand without having to hold down the grab button on the controller?
Awesome videos! Also, use localhost:27062/dashboard... instead of 8998 if the binding UI isn't working
I love this tutorial! makes learning easier. Hope to see more videos!!
I do not want to mock you these are really useful informations for me and thank you for making this content but sometimes i kind of wish to be there some subtitles because your accent is quite strong.
this is really helpful! awesome video!
Is the animation along with the revolver 3D model, or is it self-made?
i love youjr videos, i will be patreon next week
Hello, thank you for an amazing tutorial series, may I just ask you where can I get more information about how to write my tailored scripts? Example: on 5:01 you're writing stuff like hand.DetachObject(gameObject), is there any library or where can I get this information about what is possible to do with this? Sorry if my question is too complicated but I'm looking for a way how to learn scripting by myself, also is there any way how I can set up VR plugin by myself? let's say I have got a HTC vive and want to write Player instance by myself? Including implementation of CameraRig, left and right hand? Thank you... (I'm basically looking for an library where I can learn how to do the stuff)
If you look up SteamVR Unity documentation there's a fuckin massive library overthere but idk how easy it is to parse. Valem doing like several different things idk how you could find that out normally without devoting a large amount of time to reading through the documentation.
@@ezkiri2679 you cant. I was hoping he would show you how as I wanted this as well in the tutorial.
Amazing tutorials - you are a saint. I was curious if you could do a video on object snap drop zones, for example, placing a tool in a drawer where the tool drop zone highlights once the collide is hit, and then snaps to the drop zone when the hand controller lets go. I would imagine this isn't all that difficult, I just don"t know where to begin. Thanks so much!
Place an empty game object where you want it to snap to, name it something unique for that 'tool'. Make a script, when it enters collision && the player lets go, set transform and rotation to the empty object transform&rotation :)
Hey @Valem, are you planning to continue this tutorial at all, or have you moved onto Unity XR fully? This is a great piece of work and it's still up to date, please carry on with it :)
I'm also curious about this
Do a segment on how to implement and use spray cans.
Hi, your tutorials are amazing 😊😊.
One request can you create a video "How to track player collision(headset tracking) using Steam VR and activating the event " . Thank you.
Awesome ,Thank you for the tutorial!!!
AAA Content! Another awesome helpful tutorial! Merci!
Question if anyone else is using the Vive: How do you toggle the grip on the gun? I'd like the trigger to hold it until you press the grip button or something to let go.
In the button ui you can change your grab button to a toggle instead of a button
how do you use the gun you are? the gun i get from downloading it has a weird deformed mesh and has nothing inside of the prefab. if anyone could tell me what i am doing wrong i would be very appreciative!
I'm getting the same thing, it's a model of the revolver and a bullet chamber but there's nothing there that instigates use. It spawns in at a massive scale, has a bullet chamber behind the model and there's no prefab to open.
Hi guys yep I should have used another gun, this gun is weird maybe use this one instead its really great and I used it several of my tutorial already assetstore.unity.com/packages/3d/props/guns/modern-guns-handgun-129821
Pushing a button with VR hands. That is the price winner!
Hi! the i cant fix problem HandHoverxxx or OnHandHoverxxx. I try boths but does not work. In Unity 2019.2, SteamVR SDK 2.5. someone found another solution? Thanks!
Great Video again 👍🏻👍🏻👍🏻
You sir are amazing!
Thank you for your videos, they're really helping me out! Although I'm having a problem with setting action bindings with the new version 2.5.0 of the SteamVR Plugin. When opening the binding UI in the browser as usual, I get an empty chrome window (localhost can't find page). In the Asset Store under "Changes for 2.5.0" it says: * [MAJOR] Fixes the Open Binding UI button. This should now work on all computers as it opens the window in SteamVR instead of through your default browser.*
Do you have any idea how to bind the controller settings with this new version? Thanks in advance.
Fix: Change the localhost:8998 to localhost:27062
Took me ages to figure out, hope it helps :)
Great video!
Climbing in part 3?
dope man. im ganna go learn some coding and then come back lol. i just wanna build shooters and play them . appreciate you taking time to make these videos
Can you please show how to make the bullet and flash come out, and setting the damage?
awesome tutorial, also the steamvr sdk seems better than the oculus sdk
hi, i was wondering if i could get some help, i did the code for the grab but when i saved and went into unity i got a cs0103 error and it said both 'GetComponent' and 'grabType' dont exist in the current context, some guidance would be much appreciated. thx
Having some trouble with this, when i set the throwable object flags to "snap on attach, detach from other hand, and velocity movement" the hands lag behind and clip through the gun a bunch, i bet this is easy to fix but when i start to move with the joystick the gun lags behind too. So if youre aiming down the ironsights and start to move it flies off to the side and messes up your aim. Perhaps an entirely custom velocity move script could fix this? idk. What do you guys think...
For all of you who have Problems with the SimpleAttach.cs, here is the solution!!!
Change OnHandHoverUpdate to HandHoverUpdate ..
Thank you, Thank you, Thank you, Thank you, Thank you, Thank you!!!
I am sooo stupid...
@@choporo2005 same:D
Totally saved me. Thanks
Thanks a lot! That was the problem I was having as well. I wonder why I typed OnHand... instead of just Hand... I was quite sure I was following the guide strictly. Maybe it was me mistakenly adding On in front? Or did he really show the OnHand at first but later changed to a correct version?
@@3freezeen i dont know. i gues those issues are due to steamVR updates. Valem probably worked on that video on a totally different version
👍 cool Video i liked and coding this too. I don’t even have an oculus 😂
Great video. Thank you.
Is it possible to make the handpose more fixed to the gun when colliding other objects rather than the floppy attach?
Valem - you don't explain here how you set the revolver to be locked in the hand and then use the same button (Fire) to fire the gun? Unless I'm missing something and the buttons on the Oculus controllers are different; I'm using the Vive, where the trigger usually picks items up AND fires guns. It was easy enough to change the action to the Grip to fire, but obviously I'd like to change that to match the "standard".
For the grabbing boolean "bool isGrabEnding", it should be " bool isGrabEnding = hand.IsGrabEnding(this.gameObject); " in the code.
Hope this help.
I'm having trouble with making a grab offset. It keeps resetting to it's default position (green facing up, blue facing left and red facing forward) when i load my game or make changes. How can i fix this so that the arrows always point in the direction i set them to?
I'm having the same problem. Shame that this still hasn't been answered 3 months later.
same problem
is there an easier way to get the offset? I'm having lots of trouble tweaking it for my own objects.
how can i detach a GameObject via script?
What do I do if my hand poses are offset in game? I followed the steps to step up the preview hands and those are fine but in game the hands are offset
Please update the quest tutorials
yea , that was an awesome tutorial
Salut ! How to add Headset Collision to prevent the head from passing through the wall? Thank you.
Add a sphere collider on the head camera, and use a script to fade the camera when it collides! :)
Can you do the head collision?
Great video!
Does anyone know how to change it so that you can pick up the gun by just pushing the grip button once instead of having to hold the grip button?
*in serious movie guy voice*
“previously on Valem VR Tutorials” lol
Thank you!
Great video! Could you do a video showing how to attach two objects together? (ie say you wanted the user to be able to build something in the game) Thanks :)
Thanks for the great tutorial!
Also, when I was making the gun shoot, the muzzle flash didn't appear. Do you know how to fix that?
(P.S. I was using a different muzzle flash. Does that make a difference?)
Same issue here, I'll let you know if I figure out how to fix it ;)
Amazing tutorial! Possible to make one on Drawers, Doors, buttons and other interactables in VR .
Awsome video cool tutorial the best
Using the Throwable component for a gun is probably not the best idea right?
To grab a throwable object the trigger button needs to be hold, so you need another button for the shooting
What's the best way to atatch an object to the hand and have physics collisions at the same time, I'm having some trouble with that. Have you ever tackled the issue?
Anyone else have the cylinder with bullets trailing way back from the rest of the gun in their model?
Hi. great video of the SteamVR framweork and plugin. I really enjoy them. So, are a few things not working correcntly with Steam and URP? I am having terrible luck trying to get the hand.ShowGrabHint() line. I can see the Gameobject is created for the 'tip' but not activated. the ControllerHints.cs file also clearly makes the game object active, but it doesnt seem to work.
Same problem
Hey ! Can you make more tutorials for SteamVR please, even if it's been a while you didn't made one
I followed your first tutorial and breezed through it but the interactable wont work at all and I'm so disheartened.
I've enabled the script but when I walk over to it, the sphere will not highlight and I cannot interact with it.... I've tried everything :C
Hellow man, thanks for all your videos. I'm having problems with the grapping script at 04:58. There is no error compilling and the program runs normally but i can't grap the sphere. I'm using htc vive pro headseat ¿Has it an issue?
nice video, i'm trying to get into just making something for vr.
Any idea why, when I deselect show controllers, my hand movement is still limited to where the controllers would be?
Hi, i have a problem I can't make a bullet and when i'm pressing space nothing happens? I hope you can help
Thanks for the tutorial, but I and a few others have issues setting up the bullet. Can you update that part?
My revolver doesent have the childs from your video..is just a mesh
same, my revolver has no child game objects and it's cube icon has what appears to be tape on it making me think that maybe it's not fully extracted but I see no way to fully import it if that is the case
@@josephlawtoncurtis4591 just add a convex mesh collider, it will look a bit wierd but is just for testing i guess
Can we do the interactions mentioned in this video by using google cardboard and joystick?
Do you prefer steam vr or xr interaction?
Hey, I had an issue with my game where my hands completely disabled and stopped working. When I hit play the hands won't show up at all. No colliders or vibration, nothing. When I move on a different project with the same plugin, the hands are back again. Do you have any way to prevent this or have you had this issue recently? Thanks @Valem!
I had this issue some time when opening a project without having steamvr running beforehand, make sure you ve made the setup for headset and that is is running properly and then try opening your projzct :)
Thanks mate. I am looking forward to following some more tutorials. Keep up the great work my friend.
hey valem i would like to make a suggestion for a tutorial
could you make a steam vr unity tutorial on making a *realistic* gun
by that i mean a gun where you can load and dump a mag and pull the slide?
i realy love your tutorials btw very helpfull and very short!
Is there a way to make the custom hand poses with the oculus integration for the oculus store?
When I try rotating the vr_glove_right_model_slim(clone) the preview gets insanely stretched and bugged out???
Great video, can get everything working except for my hands cannot collide with the sphere. Any help would be greatly appreciated!
Will you make a multiplayer tutorial too?
Me: takes wayyyy too long messing around with the simpleAttach script
Valem: tells me that valve already wrote a script that does the exact same thing and more
Me: *dies internally while screaming and crying on the ground
D:< COME ON MAN LIKE SERIOUSLY THAT TOOK ME SO LONG
i mean i guess it felt good getting it done but SERIOUSLY
still thanks this is helpful
Ahah this comment resume pretty well the typical day of a developer! :D
Teleport Destination drawing order is incorrect when building with URP
please find Above issue and fix this
I'm watching the video so useful. However, I have a question, so I ask. Is there any way to get a gun with both hands, not a gun with one hand?!
Can you show how to make like a blade and sorcery game with physics and colliders?
Hey, thanks for your videos! Thumbs up! By the way I've just noticed that you're currently using Unity ver. 2019x, but looks like there are some troubles using Postprocessing stack in VR projects to 2019 versions. Do you have some sort of a fix for that or simply don't use postprocessing in this tutorial videos? Cheers!
Hey Platon how are you? :) Well I havent had any problem with the latest 2019.1 version. Did you encounter any trouble with it?
@@ValemVR Unfortunately yes. And there are plenty of issue reports from guys like me who encountered the same problem: shorturl.at/lGJPR
Not sure if this prolem is global, but at least I'm not the only one :) The things are so bad that there's no way of using PP stack at all, and I have to downgrade my fully assembled project to ver 2018 if there will be no proper solution - and it will be trully painfull.
Hello,
When I catch the object my hand stays in the same pose and can't move anymore. Could someone please help me?
If i get the gun too close to my body it glitches out how can i fix this?
When i did everything like you in the SimpleAttach.cs it says in "if (interactible.attachedToHand == null && grabType != GrabTypes.None)" that i got to invert if and when i go to test i can't grab it.
Can someone please help!!
I'm having the exact same issue. Did you figure out a solution? @Valem
I am having this issue as well!
You can also just use the throwable script from SteamVR apparently... Does the same thing!
anyone got a solution?
how I can change the color of hands on collision?
can i use steamvr to develop games running on Oculus?
I used the exact code as it is in the cideo and I get no errors but the game says I am using interactable as a variable and won't let me run the game anyone know how to help?
I can't grab items.
I followed all steps.
Also, my hands don't have the "Hand Physics" script, which is visable in your video 2:02
Is that the problem, and where can I get this script. I imported all SteamVR assets and it's not in there.
I also put a Debug.Log in the OnHandHoverUpdate, and nothing comes out. OnHandHoverBegin and OnHandHoverEnd work though.
Thank you.
Whoops, it's HandHoverUpdate
Are there any scripts attached to the bullet game object?
5:15 this scipt gives me these error Assets\SimpleAttach.cs(33,34): error CS1061: 'Hand' does not contain a definition for 'isGrabEnding' and no accessible extension method 'isGrabEnding' accepting a first argument of type 'Hand' could be found (are you missing a using directive or an assembly reference?)
I don't know if you need the solution or not, but your Hand must be lowercase
@@TestAccount-tz6hn ok thx lol
Help my gun falls through the floor!
Hello,
When I catch the object my hand stays in the same pose and can't move anymore. Could someone please help me? @Valem
I can follow this tutorial if I have an oculus rift s?
Yes :) You just need Steam VR that you can download in Steam