How to add flight to your VRChat avatar.

  Рет қаралды 14,366

Toolbox Motley

Toolbox Motley

Жыл бұрын

Toolbox's Workshop Discord channel: / discord
I take commissions and provide tutoring! Post what you're after in the relevant subchannels of the Discord channel linked above to get an estimate.
I will pin a written version of this video's instructions in the comments below.

Пікірлер: 60
@ToolboxMotley
@ToolboxMotley Жыл бұрын
This video will demonstrate how to add flight to your VRChat avatar. Unfortunately, due to flight's dependence on the Box Collider component, this *will not* work for Quest avatars. My own avatar uses multiple flight modes, but for this tutorial, I will be focusing on what I call "Look Mode", which allows you to fly in the direction you're looking. We'll start by setting up the flight platform. >Right-click your avatar in the Hierarchy. >3D Object. >Cube. This essentially creates a floor for you to walk on, which will follow you wherever you go, allowing you to walk on air. >Click the Cube. >Rename it "Flight Platform", or whatever else you'd like to name it. This step is only for making it more organized. >In the "Transform" component, set its Scale to 2 on the X axis, 0.1 on the Y axis, and 3 on the Z axis. That takes care of the functional aspect of the flight platform. We also need to tackle the visuals. >In the Inspector, locate the Mesh Renderer. >Click the three dots at the top right of the component. >Remove Component. >Locate the Cube (Mesh Filter) component. Remove that as well. By removing this component, you ensure that the Flight Platform is never drawn on screen, making it invisible. >In the Inspector, click Add Component. >Search for and click "Rotation Constraint". >Under Sources, click the plus button to add a source. >In the Hierarchy, expand your avatar's Armature until you reach the Head bone. >>This will typically follow the order of Armature - Hips - Spine - Chest - Neck - Head, but your avatar may use different names or even use a different armature structure altogether. >Once the Head is visible in the Hierarchy, click the Flight Platform again. >Drag the Head from the Armature in the Hierarchy, into the Rotation Constraint's Source field in the Inspector. >Click the "Activate" button. This locks the Flight Platform into pointing the same direction as the head, allowing you to control its tilt based on where your head is pointing. However, leaving the Rotation Constraint as-is will result in wild spinning when tilting your head side-to-side. Let's fix that. >Expand the Constraint Settings. >Next to "Freeze Rotation", deselect the Y and Z axes. This ensures that tilting your head side to side will not affect your flight. >Lastly, turn off the Flight Platform object, so that it isn't on by default. That's all you need for object setup. Now, we have to put together the animation. >Click the "Project" tab. >Navigate to whatever folder houses your animations. This is purely for organization purposes; if you don't mind the clutter, this could be placed in the main Assets folder if you want. >Right-click in Unity's file explorer. >Create. >Animation. >Name this animation "Flight". >Drag the Flight animation onto your avatar in the Hierarchy. >Double-click the Flight animation to bring up the Animation window. >>If you haven't already, I recommend dragging the Animation tab down next to the Project and Console tabs for ease of access. >Click your avatar in the Hierarchy to make it the focus of your Animation window. >Make sure the Flight animation is selected in the Animation drop-down list. >Click the Record button at the top left of the Animation window. >Click the Flight Platform in the Hierarchy. >Activate the object. >Click the Preview button to stop recording and stop previewing. That's all for the animation file. Most of the functionality of flight is contained in the Flight Platform's Box Collider and Rotation Constraint, so all the animation has to do is activate the object. Now for the coding. We need to locate the avatar's FX Animator. If you don't know where to find that, try this: >Click your avatar in the Hierarchy. >Scroll down in the Inspector until you find the Playable Layers section of your VRC Avatar Descriptor. >Double-click the field next to "FX" to bring its Animator up in the Animator tab. With the Animator open, we can get started on the coding. >Click the Parameters tab at the top left. >Click the plus button to add a new parameter. >Click "Bool". >Rename this new Bool Parameter to "Flight". >Click the Layers tab. >Click the plus button to add a new layer. >Name this layer "Flight", or however you want to name it for organization. >Click the gear icon for this new layer, and set its Weight to 1. Without this step, the game won't even try to use the code in this layer. >In the grid to the right, right-click, select "Create State", "Empty". >Click the New State, and use the Inspector on the right to rename it to "Off". >Create another New State. >Name this one "On". >In the "Motion" field, click the circle icon to bring up a list of the animation files in the project. >Search for "Flight" and add it. If you named your animation differently, search for whatever you named it. >Right-click the "Off" state, Make Transition, to "On." >Do the same for "On" to "Off". >Click the white arrow leading from "Off" to "On". >Expand the Settings. >Deselect "Has Exit Time", and set "Transition Duration" to 0. These changes ensure that there is no delay when you activate Flight. >Under the Conditions box, click the plus button. >Select "Flight" in the left drop-down menu. >Make sure that "True" is selected for the right drop-down menu. >At the top of the Inspector, right-click the Transition that says "Off" to "On", and Copy Transition Parameters. We can paste these settings into the next Transition to save some time. >Back in the grid, click the arrow leading from "On" to "Off". >Right-click the Transition in the Inspector, and select "Paste Both". >In the Conditions box, change "True" to "False". That's all the Animator stuff done. Now we just need to set up the menu and parameters, and we'll be finished. We'll start with parameters. >Click your avatar in the Hierarchy. >Scroll down to the "Expressions" subsection in the Inspector. >Double-click the field to the right of Parameters. >Click the "Add" button. >Change the new Parameter's name to "Flight". >Set the Type to Bool. >Click your avatar in the Hierarchy again. >Scroll down to the "Expressions" subsection of the Inspector. >Double-click the field to the right of Menu. >Click "Add Control". >Expand "New Control" if needed. >Rename this control to "Flight". >Set its type to "Toggle" using the drop-down menu. >Set its Parameter to "Flight" using the drop-down menu. With that, your flight should be fully functional. Go to the VRChat SDK Control Panel, and hit Build & Test to try it out in-game. Once you turn on Flight, you'll need to jump to start flying, and move forward to fly where you're looking. Flight essentially involves walking on invisible terrain, so just move around the world as you usually would otherwise. Depending on the world's physics settings, you may be able to jump while looking downwards to catapult yourself forward at high speed, though since this is world-dependent, it's not a guarantee.
@baselin6514
@baselin6514 Жыл бұрын
Legend
@hotaruchiyuki7711
@hotaruchiyuki7711 3 ай бұрын
No crappy mic, no annoying background music, no insanely high screen resolution, no distractors, instructions clear, calm voice, definitely worth a sub.
@CynderHound
@CynderHound Жыл бұрын
Holy crap this is a good tutorial video. Everything was clear, concise, and to the point. You even made sure to include details of how to do things without going on and on of how they work. Definite subscription from me
@treinveracity9936
@treinveracity9936 Жыл бұрын
This was a nice quick walk through. I would recommend to anyone watching this however to do a slight change. Create an additional animation called flight off. In the flight off animation simply record toggle the flight platform on then off. This way when you go back into "OFF" you will be able to stop flying without resetting your OSC.
@ToolboxMotley
@ToolboxMotley Жыл бұрын
Yup, that step is necessary if your avatar uses Write Defaults Off. Since Unity defaults to WD On, that's what my guides have been focused on, but I've got a script ready for explaining Write Defaults, explaining what it is and how to modify animations to make use of it. I just need to actually get around to recording it. x_x
@vladyvhv9579
@vladyvhv9579 4 ай бұрын
@@ToolboxMotley Hey, thanks for taking the time for that response. I was operating on the advice of another video to leave write defaults off.
@TheElemynt
@TheElemynt Жыл бұрын
I've been looking for a video like that that goes into detail with step by step instructions! Thank you for your work! Going to give this a try right away :)
@crystaltigeranimations4949
@crystaltigeranimations4949 Жыл бұрын
Hi, i havent finished the tutorial yet as I am about at the 2:49 mark, but I just wanted to say, holy shit man! I've been making an avatar with eye tracking, toggles, vismes, expressions and everything advanced for the first time and I just need to say, out of the billions of tutorials I've watched, this is objectively one of the best. You only explain what you need to, and WHY you need to do something (explaining how it breaks), but you don't overexplain the base functions of unity as if I had installed it yesterday. Easily one of the most important things to nail in a tutorial. I'm making the Spy from Team Fortress 2, and I was adding his Jetpack from the Jetpack taunt, so I'm definitely gonna be using a method like this one. Cheers.
@TheElemynt
@TheElemynt Жыл бұрын
Would love to see videos made for these other Flying methods you mentioned at the start of the video :D
@ToolboxMotley
@ToolboxMotley Жыл бұрын
I considered including those other modes, but decided against it for the sake of simplicity. There's Climb mode, which puts the platform at an incline for gaining altitude, and Flat mode, which keeps the platform horizontal for simply gliding along while being able to look around without messing with your height. There's only two modes with effects that aren't handled by Look mode. One is Fall, which simply removes the platform while the gesture is held so that you can quickly lose altitude. Then there's Speed, which catapults you forward faster than you can walk. *That* one may get a video in the future. ;)
@whatsevenhappening8295
@whatsevenhappening8295 Жыл бұрын
I will be the 100th like!!! I am glad i found this channel very helpful stuff
@johncon-vf9lr
@johncon-vf9lr 7 ай бұрын
thanks helped me out
@faith13vr92
@faith13vr92 Жыл бұрын
I noticed you built this with Write Defaults "ON". This, from what I understand means you didn't have to create an OFF animation? As I build my avatars with Write Defaults "OFF" I had to add an Off animation to the off state in the animator to make this work flawlessly. (And of course i actually find a video you have made explaining this... Facepalm) Thank you muchly for such a clear and concise tutorial explaining write defaults, Although i have known about WD for a couple of years now, Hopefully people start to understand the difference. By chance Do you have a way to edit playspace with these methods? I am making green club avatars and for the unfortunate half body users it would be nice to do the playspace toggle rather than use GoGo or Laydown
@ToolboxMotley
@ToolboxMotley Жыл бұрын
I'm afraid I haven't learned much about how to mess with Locomotion-based animations, yet. I'll have to dissect GoLoco at some point to figure out how it works. Sorry I can't help with that. :(
@faith13vr92
@faith13vr92 Жыл бұрын
@@ToolboxMotley An Easier one to reverse engineer would be the older "laydown / Sitting Animation prefab" by Nirvash on vrcarena. I personally use this over gogo myself but it also has a playspace system and from what i can see the animator is a lot simpler.
@spiriteusmjir4941
@spiriteusmjir4941 Жыл бұрын
Not sure what's wrong with the current update if they messed with the animation settings again or not, but I can't toggle the flight platform at all via the FX controls. The hover animation pack I bought works great but adding the flight platform toggle in the keyframes should work but it can't toggle. Really need help but it's hard to find someone.
@ToolboxMotley
@ToolboxMotley Жыл бұрын
The main culprit for problems like that is typically Write Defaults. Take a look at any pre-existing Animator States throughout your avatar. Click their grey box, and check the Inspector to see if the box beside "Write Defaults" is ticked on or off. This tutorial shows how to set up Flight for a Write Defaults On avatar. If your other states use WD Off, you'll need to stick with that system for the Flight you've added, as well. To do so... >Turn off Write Defaults for the States in your Flight layer. >Add the Flight animation to your "Off" state. >Set the Speed (underneath the Motion field) to -1. >Bring up the Flight animation in your Animation tab/window. >Turn off the platform object for the first frame of the animation. >Click one bar to the right in the animation graph to go to frame 1 instead of frame 0. >Turn on the platform object. >Turn off Preview for the Animation. If Write Defaults is indeed the problem, that ought to fix it. :)
@TheElemynt
@TheElemynt Жыл бұрын
Finally getting an issue I can't seem to figure out. On a different avatar I only get as far as 3:17 . Once I click on my avatar everything in animation tab grays out and I it just says No clip on the drop down and is unclickable. I've put your version of flight on many avatars I have but this one refuses to work like the others
@ToolboxMotley
@ToolboxMotley Жыл бұрын
Is there an Animator component on the avatar in the Inspector? It should create one automatically when you drag an animation onto the avatar object. My initial thought was that there might be an Animator component on some other object between the avatar and the object you're trying to modify, but if it's happening when you click the avatar directly, it sounds like something's not right with its own Animator. If it's not just a lack of Animator, go ahead and toss me a message on Discord with a screenshot of the Animator component and the Animation window.
@TheElemynt
@TheElemynt Жыл бұрын
@@ToolboxMotley Thanks for the reply and sorry for taking so long to get back to you. I think I figured it out. The avatar is pretty heavy with features. I think the problem is that it's memory capacity is full and doesn't have enough space to add this to it's roster is things
@spicy_ojg
@spicy_ojg Жыл бұрын
Mine is a flying drom avatar for quest
@TheElemynt
@TheElemynt Жыл бұрын
-So flying works as it should. However toggling it off doesn't work. It stays on even when trying to turn it off. I followed your video word for word. Thoughts?- Never mind! There was nothing wrong. It hit me that I might have to turn on and off the OSC to update the activate and deactivate of the button like how I have to do that when I mess with my size scale. Your video was perfect! Thank you so much for this :D
@ToolboxMotley
@ToolboxMotley Жыл бұрын
Was just about to write out some possible culprits. XD Glad you got it figured out!
@whatsevenhappening8295
@whatsevenhappening8295 Жыл бұрын
Same thing here BUT when i press reset osc its still doing it.
@ToolboxMotley
@ToolboxMotley Жыл бұрын
@@whatsevenhappening8295 Could be an issue with Write Defaults. I've got a video in the works explaining that, but I've been too busy to get it made so far. However, I've got the script all written up, which you can find in my Discord channel under "Upcoming Tutorials". Take a look at that, and see it if helps with your issue. :)
@TheElemynt
@TheElemynt Жыл бұрын
@@whatsevenhappening8295 Are you flipping the OSC from On to Off then back to On? So like it was already set to On. Then you turn flying off after using it for a bit. You need to turn OSC off then back on for the change to take affect
@Sawrunner.
@Sawrunner. 4 ай бұрын
I have a problem. So basically, I have a fully animated avatar, without a trace of standard vrc locomotion anims, and all of my animation toggles and locomotion have froze and stopped working after I added flying.
@ToolboxMotley
@ToolboxMotley 3 ай бұрын
Shoot, KZbin didn't notify me about this comment. :( That sounds like a potential Write Defaults issue. Do you know if the pre-existing animations were set up with Write Defaults turned off? If so, you'll need to set Flight's animator states to Write Defaults Off as well, and create a dedicated Off animation for the flight. I have a video about Write Defaults elsewhere on my channel if you want more info on Write Defaults. I'm really sorry it took me so long to get to this. :( I don't know why I didn't get any notification.
@Sawrunner.
@Sawrunner. 3 ай бұрын
@@ToolboxMotley I'll check it out
@shivettesenpai9116
@shivettesenpai9116 Жыл бұрын
Is there a way to change flight trajectory every time you jump? Or how to change the distance covered every time I jump?
@ToolboxMotley
@ToolboxMotley Жыл бұрын
It's hard to finetune that given the wonky physics at play, I'm afraid. However, I have found a method for consistent high-speed lunging that I might make another video for in the future.
@shivettesenpai9116
@shivettesenpai9116 Жыл бұрын
@@ToolboxMotley That would be highly appreciated!
@AllTheNamesAreFTaken
@AllTheNamesAreFTaken 10 ай бұрын
@@ToolboxMotley What settings did you use for the platform for lunging? I've been experimenting but it's a slow process and nothing I've come up with is perfect (The main issue is my head tilt changing the lunge into flight or not lunging/flying at all
@Wave420_
@Wave420_ 8 ай бұрын
Hey, I don't know if anyone knows how to fix this, but at 6:20, when I go to the "Expressions" subsection, my "Menu" and "Parameters" fields cannot be double clicked; nothing pops up. Also, both fields are named "None (VRCExpressionsMenu)", while the ones shown in the field seem to be named already. Does this mean I have to set this up beforehand, or is this a problem unique to my avatar? I use a Rusk avatar, if that matters.
@ToolboxMotley
@ToolboxMotley 8 ай бұрын
Yeah, you'll need to make the Menu and Parameters for your avatar, first. If you right-click in the file explorer section at the bottom, you can select Create > VRChat > Expressions Menu/Expressions Parameters. After making them, just drag them into the relevant fields in the Avatar Descriptor to start working with them. :) If it won't let you drag them in, check the avatar in the Hierarchy so see if the name is colored blue. If it is, right-click it and select "Unpack Prefab Completely", and that should give you access.
@Wave420_
@Wave420_ 8 ай бұрын
@@ToolboxMotley Alright, so I was able to make Expression Parameters and Expression Menu and drag them into the relevant fields. I followed until the end and then I tried uploading the avatar, thinking I was done. But, apparently, the upload process was stuck on "Refreshing Data" and I received some errors in the console. I then redid everything, thinking that I might have missed something throughout the guide, but I still get stuck on the "Refreshing Data" (with different errors this time). I'm not sure where I went wrong. My guess is that I might have dragged the wrong head bone into the source at 1:30, but my avatar doesn't have an explicit name for the head bone; it's just called "Body" (shows the orange outlines of the avatar's head in the scene). Do you know which part I could have gotten wrong?
@PhobosARK
@PhobosARK Жыл бұрын
I have an avatar in vrchat that has a flight but its gogo loco and you can adjust your speed. do you know how i can add that to my avatar?
@ToolboxMotley
@ToolboxMotley Жыл бұрын
I've been wanting to dissect their flight system for a while now, but haven't gotten around to it yet, I'm afraid. :(
@thebluedragonontheskyscrap1838
@thebluedragonontheskyscrap1838 10 ай бұрын
Hey I followed this tutorial but haven't been able to get my avatar to fly. I enabled the flight platform by default to test it and it still doesn't fly. I followed the steps shown in this video, and I'm not sure what I'm missing. I saw another comment that you responded to talking about a giant avatar. My avatar is 0.23 meters tall. Could that be the issue? Or will the fact that it is both pc and quest compatible affect the pc version of the avatar and make it not work?
@ToolboxMotley
@ToolboxMotley 10 ай бұрын
You won't be able to use it if you yourself are playing as the Quest variant, but that shouldn't prevent the PC one from working. I could see the small size potentially causing issues, but there should be *some* setting that would get it to work. Can you list out the Flight Platform's Transform settings, as well as its Collider settings? Have you made sure the object is placed *in* the avatar rather than underneath it? (When collapsing the avatar in the Hierarchy, you shouldn't be able to see the flight platform's object in the list.)
@thebluedragonontheskyscrap1838
@thebluedragonontheskyscrap1838 10 ай бұрын
I got it working now! Just had to move the flight platform under the viewport rather than my avatar. My avatar's viewport is janked for some reason and has to be off to the right or it doesn't work. Unfortunately now whenever I try to create the on and off frames for the flight platform, it switches the animation window to be of the flight platform instead of letting me switch it on as an animation. Edit: I got that second part working too. I had to lock the animation window, which then allowed me to do what was needed.
@thebluedragonontheskyscrap1838
@thebluedragonontheskyscrap1838 10 ай бұрын
I'm now having an issue of it drifting downwards instead of staying in place. How can I fix this? Edit: I figured out that the downward drift is world dependent. I wonder if there's a way to counteract it though.
@Knigthmare
@Knigthmare Жыл бұрын
Hello, i want to add fly mode to my avatar, unfortunaly it won't work... Your tutorial is well described, but do you have a solution for it ? Do i have to expand the platform ? the avatar height is 254m
@ToolboxMotley
@ToolboxMotley Жыл бұрын
254m? That is *gargantuan*. o_o Yeah, you'll probably want to make the platform larger, in that case. Try 25x, 5y, 25z to start with, then go down from there if it works.
@Billie792
@Billie792 2 ай бұрын
can you a ragdoll avatar in vrchat pls
@CptTaquito
@CptTaquito Жыл бұрын
Hi, not sure this will get a reply but, i followed the tuturial and the flight toggle turns on, but when i toggle it off the flightbox remains and it doesnt turn off, im not sure what i did wrong but i followed step by step
@ToolboxMotley
@ToolboxMotley Жыл бұрын
Sounds like a Write Defaults issue. I've got another video on how to deal with that (just look for "Write Defaults", should be the latest video), but in a nutshell: you're going to need another animation for the Off state that manually deacrivates the flight platform.
@craindemolik7231
@craindemolik7231 Жыл бұрын
The Flight is working nearly perfect! The only thing not working is that I wont fly upwards when lookin up, how do I fix that?
@ToolboxMotley
@ToolboxMotley Жыл бұрын
Too steep an angle may keep you from moving upwards. Does the flight let you move downwards, or is it always lateral with a slight drop? Are you using it on desktop or in VR? Is the Rotation Constraint sourced to the avatar's Head bone?
@craindemolik7231
@craindemolik7231 Жыл бұрын
@@ToolboxMotley Its always lateral with a slight drop. Both. Yep.
@ToolboxMotley
@ToolboxMotley Жыл бұрын
@@craindemolik7231 It sounds like something might be wrong with Rotation Constraint. It might be a matter of being oriented differently than normal. Try finagling the "Freeze Rotation Axes" settings; instead of freezing the X axis, try the Z or Y axes. Make sure that the "Is Active" and "Lock" boxes are checked, as well. If that doesn't do the trick, it may be best to take some screenshots of the Rotation Constraint settings and animations, and send them to me on Discord so I can try to pick out what might be wrong.
@craindemolik7231
@craindemolik7231 Жыл бұрын
@@ToolboxMotley Found the Error! Needed to freeze another axis. Thx a lot
@KazeMunashii
@KazeMunashii 9 ай бұрын
not flying if you're essentially slowly falling
@ToolboxMotley
@ToolboxMotley 9 ай бұрын
I have the feeling that far fewer people are searching for tutorials on "How to add slow-falling to your VRChat avatar".
@zip69420
@zip69420 7 ай бұрын
whats the name of the avi
@ToolboxMotley
@ToolboxMotley 7 ай бұрын
My avatar? I named it "Techameleon". You can use the public variant via vrchat.com/home/avatar/avtr_28d70384-b381-4bf8-ad50-16563afc5314 :)
@spicy_ojg
@spicy_ojg Жыл бұрын
Wait that's not true because I have a flight avatar for quest not joking
@ToolboxMotley
@ToolboxMotley Жыл бұрын
It's technically possible by editing the SDK, but goes against VRChat's terms of service. Unless they changed their component whitelist recently.
@spicy_ojg
@spicy_ojg Жыл бұрын
Your wrong
How to Create Contacts for your VRChat Avatar Tutorial
7:08
Burnaking
Рет қаралды 15 М.
Amazing weight loss transformation !! 😱😱
00:24
Tibo InShape
Рет қаралды 55 МЛН
How to add GoGO Loco in unity VRchat An actual tutorial
10:58
GaryAsparagus
Рет қаралды 82 М.
[HOW TO MAKE] 2 Axis Puppets - UNITY/VR CHAT
26:05
Neffertity
Рет қаралды 33 М.
How to add GoGo Loco to a VRChat avatar.
8:42
GhosttankTTV
Рет қаралды 68 М.
How to add Portals to your VRChat avatar.
17:12
Toolbox Motley
Рет қаралды 1,8 М.
Adding chairs to your VRChat avatar.
3:55
Toolbox Motley
Рет қаралды 11 М.
How To Create A Custom World Constraint | VRChat Unity Tutorial
13:01
How to add invisibility to your VRChat avatar.
9:19
Toolbox Motley
Рет қаралды 24 М.
He doesn’t like illusions
0:17
V.A. show / Магика
Рет қаралды 15 МЛН
Собака не хотела чтобы так вышло...❤️
0:24
When an RV meets a zombie outside #rv
0:21
campingWorld
Рет қаралды 30 МЛН
Stay on your way 🛤️✨
0:34
A4
Рет қаралды 8 МЛН
MrBeast Встретился С Сигмой😳 #shorts
0:48
a_ve_znali
Рет қаралды 3,6 МЛН