How To Setup Gesture Based Toggles For VRChat - Unity

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello there's Pinky and this tutorial is basically going to cover how to add a gun to your avatar and how to make it fire when you pull uh a gesture so to get started we're going to need the actual gun and particles so I'm going to leave a link to these in the description these will be perfect for what we need they're pretty old but they still work and so I'm going to go ahead and drag these in and import them to my project so I'm just going to quickly do that let it go through all of the uh the process now now that that is done I'm going to grab the dubstep gun and I'm going to rotate it to fit uh 90 degrees this way and 90 degrees this way and then I'm going to just move it up so again the W key we'll put it in this move version e we'll put it in the rotate version and uh R will put it in the resize so if you want to make it bigger or smaller you can do that but for now I'm going to keep it this size and I'm basically going to just move it around until it looks like it's going to fit so right around here and then I'm gonna bring it up a little and right about there so this is just uh for now for testing it's gonna look like that and now I'm going to grab the gun particles I'm going to drag this in I'm going to quickly reset uh the rotation of it and then I'm going to click on it and I'm going to rotate it this way and I'm I see up here zero degrees means it fires this way which is perfect and then I'm going to move it at the gun so I'm gonna put it up here I'm gonna put the toggle it off and I'm going to position it kind of in the middle of the gun and now if it's all good on again it looks pretty alright so I'm gonna turn that off for now and I'm gonna place this under the gun and just for the sense of this video I'm going to be removing uh the music Source because I don't want to play copyrighted music but you can keep yours if you choose to use this now that this is done we are going to want to add this to our Avatar so we're going to open up our Avatar I'm going to open up our Armature hip spine chest and we're going to make sure we go to the right shoulder so this one right here and we're going to open it up till we get to hand so this will basically be where we want to attach it to so we're just going to drag this underhand and put it down like that now The Next Step will be when we do a certain gesture we want uh this to toggle on so one problem that you may see is that there is an animator here within an avatar now this will cause some issues so what we're going to do is we're gonna do a little bypass with this so you can choose to either temporarily remove this and re-add it which is the easiest version so of course you could just remove component and then you can go to your avatar here and you click on your FX and then you take this that is highlighted and you drag it up here in your controller and then now you go to the animation Tab and you should be able to make custom animations now so we're going to make a custom one we're going to call it gun on press enter we're going to hit record and now we can click on here and we're going to toggle this on and now we're gonna go back here create a new animation and I'm going to quickly create a new one and call it gun off and we're going to hit record we're going to toggle it on and then off and this will should mean that this is off now and we're going to do the final steps of the animator so again we're going to click on our Avatar we should have an animator here uh make sure to delete these animations out of your base layer because this could ruin your animations so just hit the delete key we're going to create a new one and we're going to call this gun and so in this what we're going to do is we're going to create an empty and then we're going to create another empty this one will be called off because our default we want it to be off and then this one will be called on and of course this is for the gun being on and off so we're gonna put the on animation inside of here uh what was it gun on and then we're gonna go to the auth and we're gonna Place gun off in this one and we are going to connect these and we're gonna make sure that in this one we want our selected gesture to be equal to the one so if you don't see just your left and gesture right here what you can do is you can go over your parameters you can hit plus you want to make sure that it's an INT and you want to name it exactly gesture left capitals are very important so uh make sure that it is exactly that but we are going to uh add this I'm going to quickly delete that and we are going to make it so that it is equal and we're going to make it equal to the hand gesture of six and then we're going to make this one gesture make sure it's the same one so just your left and we're going to make it not equal to six and we're going to quickly get rid of these exit times so set these to zero and we're gonna disable these and after we have done that if we go over to scene and we pull out our handy um where is it there it is our gesture emulator and we hit enter play mode and we give it a few seconds to load up now if we make sure we do on the left hand gesture six which should be the gun you can now see that it triggers and it shoots off the gun and if you were to click it again it disables it so this has been a pretty simple tutorial on how to toggle stuff using gestures uh and of course if you wanted to do this on the right hand you would just switch this part to uh gesture right and then of course you'd put the prop on your right hand anyways again short tutorial uh thank you for watching this has been Pinky and I hope you have a good rest of your day please like And subscribe a big thank you to my patreons dreaded Zachary Taylor blue Nino one logs one two three four Suzuki TEF sir fappingson hamoo and the maple Proto thank you guys for supporting me through patreon what you guys do allows me to make content like this I appreciate it um again it's it really helps me out if you are interested in getting a little video buddy you could subscribe to the tier three and uh if you just want to support me you can uh just share the video around uh thank you and have a good rest of your day
Info
Channel: PxINKY
Views: 3,281
Rating: undefined out of 5
Keywords:
Id: dQeU2UqgBrk
Channel Id: undefined
Length: 7min 16sec (436 seconds)
Published: Thu Aug 31 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.