How to make grabbable props for your Avatar | VRChat Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi in this video I want to show you a simple way of how to make a grabable prop in VR chat with contacts okay so let's start first you'll need to drag the prop onto the base of your avatar to the root scale it to the correct proportions that you want to have it at and now we need to create two empty game objects at the two positions where you would like it to be for one I would like my sword to be on the hip I'll call it prop hip pause and another one at the right hand I want to be able to grab my thoughts from the hip with my right hand and then it goes over to my right hand so we navigate there right wrist empty game object and rename it too prop hand pause now you will have to select your prop and add a parent constraint here you add two sources and drag in both the position empty game objects that we just created the prophet pause and prop hand pause for now let's make the hand position to zero this to one click on the Zero button and activate what this does is if we move the prop hip position around the prop the sword will follow it around now we need to put this prop hip pause into the position where you want it to be do not move the prop itself only move the empty game objects that are in the constraint sources all right I want my sword to be somewhere around here if we go and select the prop again and change the sources on the hip to zero and hand to one and now we do the same thing here adjust the position of the empty game object so that the prop is placed correctly okay now that we have that done switch it back to the default position which is the hip now we need to make an animation where we switch the constraint settings we select our Avatar window animation animation and create a new one here call it prop hip press and record choose your prop and make sure if it's already at the position where you want it to be change it change it back to where it should be so that in the animation you have the correct settings the prop hip position source is one the prop hand position is zero make another animation called prop hand and here we do the reverse proposition is zero prop hand position is one as you can see the sword is now in the hand now that we have that done select your avatar again and remove the animation we just created from the controller here and now we need to work with contacts I want to be able to grab this if my right hand reaches for the handle at my hip so on the hip I create another new empty game object and call it prop contact and add a component called contact receiver this thing we need to scale down a little bit zero five should be about it and because it's an empty game object we can just move it around with the arrows here and move it to the position where you want to be able to grab it this seems about right now we need to disable the Collision for others we only want it for ourselves and add a collision tag I want hand R I want to be able to grab it with my right hand we need to give it a name I call it grab so whenever my right hand enters this contact receiver it will set the parameter grab to 1. now we need to head over to our FX layer in here we need to create a new parameter a Boolean called exactly the same as the parameter we just defined in the contact in this case grab so if we go over here to the contact receiver this is grab and this needs to be grabbed as well create a new layer you can call it however we want prop grab and set its weight to 1. now we need to drag in the prop head position first our default State we want it to be here by default and then the prop hand state now we can make a transition from one to the other and the other way around and now we need to make a condition so per default it will always play the prop animation it will have the prop at your hip and we want to put it in our hand if the grab parameter is true so if our right hand is in that contact receiver but we also want to limit it if our gesture on our right hand equals one which is fist so if we put our right hand into the contact on the handle of the sword and have a fist then it will go over to propane to this animation and switch the constraint settings and now your sword will be attached to your hand how do we get it back to our hip first of all we also want grab to be true so if our right hand is inside of that contact receiver but our right hand gesture should be not equal one so if we grab onto the handle with a fist then it will go in our hand and if we have our right hand into the contact receiver without a fist like an open hand or something else it will go back and stay on the hip at the moment everything will be a little bit slow we need to change some settings here disable has exit time and I like to set the transition duration to something like 0.01 you can also set it to zero I just don't like it if it is instant and now it will go from one state to the other very quickly alright that's already it I hope this works for you if you have any questions feel free to ask them in the comments I hope I could help you and I wish you all a good day bye bye
Info
Channel: Airpaca
Views: 8,743
Rating: undefined out of 5
Keywords: Airpaca
Id: eL9JmlpV79g
Channel Id: undefined
Length: 6min 54sec (414 seconds)
Published: Sun Jan 15 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.