Exactly what i was searching for... just need to wait 2 more hours... hopefully that video explains the new input system good enough. But if this video ist only half as good as your other videos it will be awesome.
@JustinPBarnett3 жыл бұрын
Thanks so much!! Hope you enjoy! I'll be in the chat if you have any questions!
@maxrandolph5437 Жыл бұрын
YAAAAAS! where is your patreon? You are the first I have seen to walk through this so clearly. Thank you
@gravityowns85593 жыл бұрын
Wanted to comment and say that I joined your patreon. I'm really enjoying the content! Keep up the good work!
@JustinPBarnett3 жыл бұрын
Thanks so much!!
@blackalessio39503 жыл бұрын
Awesome Video! It helped me a lot! Can't wait to see the next Videos!
@JustinPBarnett3 жыл бұрын
Thanks so much! Glad I could help
@tonypitman56483 жыл бұрын
Just joined on Patreon. Your videos are worth it. Thank you. Really looking forward to your series on a full XR body.
@JustinPBarnett3 жыл бұрын
Thank you SO much! That means the world to me! 🙏🏻
@ruannel4003 жыл бұрын
This channel is gonna be bigger than Brackeys
@JustinPBarnett3 жыл бұрын
I friggin hope so man! That would be amazing!
@avery13493 жыл бұрын
I'm super glad I found your channel, liked and subbed. The video was great, you're really clear and do a great job at explaining stuff well, while keeping it moving. Looking forward to watching more of your content.
@JustinPBarnett3 жыл бұрын
Welcome aboard!
@cedricknapp28893 жыл бұрын
Was struggling with how to get the value of the input from an XR controller with the new input system compared to the old "InputDevices.GetDevicesWithCharacteristics......." way. This helped me out a bunch, thank you!
@JustinPBarnett3 жыл бұрын
You're so welcome!
@gizmobly3503 жыл бұрын
Thanks! This was so helpful! I started some Unity VR dev stuff awhile ago and got the basics up and running with the old system. I was so excited making cool 3d models to interact with that I fell down a Blender rabbit hole for the last year. Just started VR back up this year and was like, "Oh, what the heck! Action Input!" Even after watching multiple tutorials on the new input system, I still felt like an idiot. Just had a hard time grasping it. Seems like everyone explains it in a little different process. I was just going to stick with the old Device way. Not anymore! I feel so much better with it now. The way you explained it made it click. Great job! Can't wait to see what you put out next! For ideas for other tutorials. I really love the game Raft for it chill out and build up vibe. I would love to do a VR Raft type game in space where you just float in a little craft and cast out a tether to catch space debris. Crafting up stuff to grow your little ship and eventually save the universe. I've been trying to come up with a way to shoot out a tether(fishing line) and snag objects that float by and reel them back in. How would you implement a grappling hook/tether/fishing line thing? I could just use the ray interactor? But I would want the tether to have physics so it starts out loose, gets taut once it snags something, and sort of lobs it back to you. I know I'm punching above my weight class. Probably need to make a bowling alley first. :) Thanks again!
@JustinPBarnett3 жыл бұрын
Great! Glad it helps!! I have yet to do the Blender rabbit hole 😬 that scares me a little bit lol
@Wayne-sn6qy3 жыл бұрын
This is so great you saved me! I've been searching new input system tutorial for a while and couldn't find out 😢😢
@JustinPBarnett3 жыл бұрын
Glad I could help!
@thebutterappletutorials65533 жыл бұрын
Damn been trying to learn this for so long, such a nice video thank you! Edit: Also Super excited for the future videos! My main issue with XR rig and VR Development in general, is that I never understood how to do physics movement/interaction so it would always feel a bit weird so learning that sounds amazing!!!
@JustinPBarnett3 жыл бұрын
You’re so welcome! And I gotchu, physics is coming in the next video or two!
@thebutterappletutorials65533 жыл бұрын
Yesss!!!
@enesayhan5001 Жыл бұрын
you are a PERFECT man I've ever seen bro... Thanks a lot..
@JustinPBarnett Жыл бұрын
Happy to help
@enesayhan5001 Жыл бұрын
@@JustinPBarnett in my project Ihave a lot of problems and questions. How can I contact you? Are you ok for this? If you accept to help me I will be very thankful…
@Praveenkumar-jb3wd3 жыл бұрын
Hi Justin..Good Videos from ur end man.. Go on
@JustinPBarnett3 жыл бұрын
Thanks so much!!
@rafaelbraga3d3 жыл бұрын
Awesome video man! Got one more subscriber.
@JustinPBarnett3 жыл бұрын
Welcome!!
@waffleskeppy44983 жыл бұрын
You deserve a lot more subs
@JustinPBarnett3 жыл бұрын
Wow thanks! Soon!!
@JustinPBarnett3 жыл бұрын
@Naglasgeimeris what video is that comment I need to remove on?
@waffleskeppy44983 жыл бұрын
@@JustinPBarnett The premiere. The guy posted a comment with a website link which brings you to a disgusting website. Edit: pretty sure either you or youtube fixed it
@JustinPBarnett3 жыл бұрын
@@waffleskeppy4498 KZbin got to it even before I saw it! I've had a few of those start popping up recently...
@martyhugo2 жыл бұрын
like your approach, videos are great, keep it up please!
@regularmenthol3 жыл бұрын
@7:20 my Visual Studio doesn't throw this error but Unity does.. how can I fix without that little shortcut you did?
@JustinPBarnett3 жыл бұрын
Add "using UnityEngine.InputSystem;" to the top of the file!
@regularmenthol3 жыл бұрын
@@JustinPBarnett awesome thank you. this made me realize I should probably actually learn basic Unity before I jump into VR, haha
@JustinPBarnett3 жыл бұрын
@@regularmenthol oh 100% recommend getting a basic understanding of unity before diving headfirst into VR!
@regularmenthol3 жыл бұрын
@@JustinPBarnett yeah I think I'm gonna put in the time, Unity seems super cool and I'm getting better vibes from it than Unreal. Appreciate you responding, rad rad rad. If you ever wanna learn Houdini I will def return the favor!
@JustinPBarnett3 жыл бұрын
@@regularmenthol You're so welcome! Ooo might be interested in that trade. Oh! and have you joined our discord? discord.gg/6mzMQx5VKk
@eugenesukuleleguitartabsan53393 жыл бұрын
please, who will tell me why when I want to assign a function (OnMovementChange (9:23 this video)) in the popup, I have no such function a have only Static Parameters (Unity 2020.3.0f1) Thanks!
@JustinPBarnett3 жыл бұрын
Did you make your method public?
@eugenesukuleleguitartabsan53393 жыл бұрын
@@JustinPBarnett there was an error in the script) Thanks!
@JustinPBarnett3 жыл бұрын
@@eugenesukuleleguitartabsan5339 Glad you figured it out!!
@Mad_Luv853 жыл бұрын
bro the way you just setup the keyboard and all that was amazing havnt found a video on it. is there any way you can do a video on creating a crosshair spread on player movement such as walking in VR. id love help on this... not sure the best efficient way to do this as ive been told use GUI but ive been told use iTween. not sure.
@JustinPBarnett3 жыл бұрын
There's definitely a UI tutorial coming out in the next few weeks! Not sure you would need the crosshair spread (worse aim while moving) like normal FPS games because the user has to aim themselves in VR, but you could absolutely apply that to the end of a gun raycast if that's what you need for your game. Tutorial to come!
@Mad_Luv853 жыл бұрын
*I'd love if you could show me the best way to make an animated crosshair that moves on input with walking around which I can essentially attach to my dome. This would help me tremendously. I know reticle placement and scale is different for VR. My crosshair always seems to flicker n shake and I'm not sure why lol and it's when I'm moving. It's like it's trying to play catch up with the frames. // So how I invision the UI and Mechanics and perhaps it's not practical but The reticle is attached to the cam so where you look is where it aims. If I'm wearing the headset and look up ..I'm aiming up to the sky with my crosshair only except from my view I'll only see the hud and crosshair. I will never see my actual character and never my body model nor weapon. . However when i Iook up if an online player is looking at me or shall I say my character , he will see my character looking up aiming the gun up to the sky. I have alot of research to do clearly. But for now I'm trying to get some basic hud designed and some basic functionality before I can tap into what's replicated and rendered per player vs what's not. Definitely going to test alot of different things. Iti give a better example here's more about it if you got the time. so in my brain which is complicated I have a vision. Id like to prototype a proof of concept like "The old ghost Recons or rb6 Rogue spear games but with hybrid controls - with that being said the idea I have is - it's like a hybrid control system ***(because I want something that players can be somewhat familiar with) but it's A mix between 'Familiar controls" with some VR functionality. Essentially I want to use the controller like normal to move around. With the right controller being able to snap at degrees and or smooth turning as well. And being able to look freely in VR is important as well. however I want it so when your in VR that only you can see your hud such as things like " character stance" on the hud , you can also see your weapons icons and your reticle/crosshair. There are certain things that you'll be able to do as a character in VR when it comes to mechanics that just won't be replicated over the network to other players Intentionally. This was done in games like battlefield 5 when your teammate is down and shot your team see's his character playing The "bleedout animation", however the enemy cannot see the player squirming around bleeding out because it's not replicated over the network intentionally. When the enemy shot his opponent he just saw it as he killed him. While on the opposing team he can see his team mate down bleeding out with a chance to revive. Sorry very hard to explain lol Games like onward and population one make animations and collisions look wonky and I'm trying to prevent that. But yah. Do you think any of what I said is possible or practical . 😂
@JustinPBarnett3 жыл бұрын
@@Mad_Luv85 Oh gotcha! Yea I can definitely help with that kind of thing. For starters, try doing your crosshair code on the LateUpdate() call instead of Update(). That may help your jittering a bit.
@joobroobn46403 жыл бұрын
U are amazing bro
@JustinPBarnett3 жыл бұрын
Thank you so much! 😀
@shimmery12103 жыл бұрын
Hi, I don't think CharacterContorller methods should be put in the FixedUpdate. In its description, Unity says:"A CharacterController allows you to easily do movement constrained by collisions without having to deal with a rigidbody." And "It is recommended that you make only one call to Move or SimpleMove per frame."
@JustinPBarnett3 жыл бұрын
You're correct. Character controller stuff isn't physics based. Good catch!
@Mad_Luv853 жыл бұрын
The new VR system has been a nightmare for me just setting up. I get its more efficient and less code but man setting this up is a pain so much errors for hours still in limbo with understanding how to make my character turn or snap turn with while in the scene and to be able to look around im on a quest 2
@JustinPBarnett3 жыл бұрын
100% agree....OpenXR is still a baby and doesn't have a lot of the nice pre-built actions & animations that SteamVR or the OVR plugin did. Oh! and I'm covering snap turns & continuous movement in my next video on Wednesday!!
@ricardoi81713 жыл бұрын
Nice content !
@JustinPBarnett3 жыл бұрын
Thanks!
@Fahrenheit51e3 жыл бұрын
Hi! Thank you so much for this video! It was the only one I could find that worked! I've been trying to add "Jump" to the script but my little cube just start shaking like crazy!? I added: public void onJump(InputAction.CallbackContext context) { GetComponent().velocity = Vector2.up * jumpVelocity; } Then added the Rigidbody component to the player. Now when I press play the cube starts shaking. If I disable "Character Controller" the cube stops shaking and I can jump, but I can't move... What am I doing wrong? 😭
@JustinPBarnett3 жыл бұрын
Thanks so much! You're so welcome for the video! And you're changing the velocity directly instead of just adding to it. Try .AddForce(...) to the rigidbody instead of .velocity = ... and see if that works any better
@Fahrenheit51e3 жыл бұрын
@@JustinPBarnett Thanks for your message! I tried with public void onJump(InputAction.CallbackContext context) { rb.AddForce(0, thrust, 0, ForceMode.Impulse); } But again if Character Controller is enabled the cube just starts shaking :\ As soon as I disable that, I can jump.. but I can't move 😅 I even tried making a new project from scratch. New InputActions -> Generate C class -> Make script -> Add Rigidbody + Character Controller + PlayerInput + Script to the Gameobject Player Cube starts shaking 🤯
@JustinPBarnett3 жыл бұрын
@@Fahrenheit51e I'd suggest following the jump portion of this tutorial: kzbin.info/www/bejne/lYLEm6WXl96HgMU maybe he covers something you missed in your code! Let me know if that helps!
@adityapatel6438 Жыл бұрын
too nice bro...very helpfull really
@JustinPBarnett Жыл бұрын
Glad to hear that!
@jedoncarter85703 жыл бұрын
Thanks man, after 3 hours of trying to figure this out the second method you provided finally worked for me. I dont know if its my Unity version or what but the "easier method" (with the player input) does not work for me at all. Note: You can also enable the entire action map instead of the particular action. More efficient according to Unity
@JustinPBarnett3 жыл бұрын
Huh, could be your version. I updated to 2020.2.7 right before this vid. Oh cool! I’ll enable the whole thing next time. That makes much more sense. Glad you got it working!!
@rodrigo.cs.machado3 жыл бұрын
Amazing bro! And what would it be like to make him jump using the joystick?
@JustinPBarnett3 жыл бұрын
Using the joystick? I’d recommend using a button for jumping. But you’d add a new input action called “Jump” and then set the input to “button”’or thumb stick or whatever you want. Then reference it just like you would the move input
@NickBaijens3 жыл бұрын
live chat ended before I finished typing this so gonna just dump it here, but in regards to creating a multiplayer hangout of the project we were taliking about at the end there: "I might, maybe not as a standalone thing, but I believe I have a VRchat account that can upload custom content so might look into that for multiplayer"
@JustinPBarnett3 жыл бұрын
that's a good idea! Probably will end up being a lot easier than developing your own multiplayer system anyway :p Let me know when you release it! I'd love to check it out
@tacticalmythic79452 жыл бұрын
thanks for the amazing tutorial like always!!! :)
@JustinPBarnett2 жыл бұрын
You're so welcome!
@cheesepantsgaming19643 жыл бұрын
I know with this knowledge I could apply it to any key binding. But what if you did a tutorial similar to this with unity's default bindings? Or maybe talk about why you would create your own binding vs using unity default ones. I was just wondering, because in some videos you show the set up for the quest with default bindings. Just an idea. I hope you have success with the channel
@JustinPBarnett3 жыл бұрын
Probably going to do an updated video about this soon.
@lx638111 ай бұрын
i am trying to do this in vr. but i am only using the device simulator. my problem is: i can move but i cannot change the view of my character. it's always looking in the same direction.
@Dodger51633 жыл бұрын
Hi! Great videos on VR. Question on actionbased input system. How to get the actionbased controllers velocity? Devicevelocity. I can track the devicevelocity in the debugger but dont know how access it in c#..Trying to make a climber function with this new input system and actionbased controllers using openxr. Anyone?
@JustinPBarnett3 жыл бұрын
Unfortunately there isn’t a way to directly call the velocity atm. The workaround I’ve found for it is to store the last 3 positions of each controller in an array and then do a calculation on it to find the avg distance traveled / time. I’ll let you know know if I find a better way to do it.
@Dodger51633 жыл бұрын
@@JustinPBarnett Actually I found a way! You can access the devicevelocity thru an action in the input actions asset. I changed the haptic action to a new binding "devicevelocity" and changed the action type and control type to value and vector3. It works but I didt figure out how to add a completely new action and access that action in c#, thats why I changed the haptic action.
@JustinPBarnett3 жыл бұрын
@@Dodger5163 oh dope! Thanks Olof! I’ll give that a shot
@Gasparmr63 жыл бұрын
Hello, I have just watched this video and I tried and everything goes fine until I try VR. I have also tried it with the old Input System and in both cases Unity doesn't detect my right/left Controllers when I press some buttons (although unity does detect the position, rotation and velocity of the controllers cause the lasers move fine). I realised that it only occurs in PlayMode (when I build the project everything goes fine) Anyone knows what is going on? I am new in Unity and VR so maybe it is a silly thing but I have been stuck for a long time Thank you!
@mrfloppy-t7s3 жыл бұрын
YES! I HAVE THE SAME FUCKING TROUBLE! I SPENT 2 WORKING DAYS POINTLESS, TRYING TO MAKE THIS SHIT WORK! NOW I CAN BUILD AND TEST!
@mrfloppy-t7s3 жыл бұрын
no, I can't. help me please someone.
@JustinPBarnett3 жыл бұрын
Join the discord if you're still having issues and we can help you troubleshoot!
@JonTopping2 жыл бұрын
When you make it use the XR joystick, I got that working fine. What I would like to do is get that vector 2 being created. I'm assuming it's between -1 and 1 on x and y, right? I want to specify up/down/left/right, which I can do easily (because math) IFF I have the vector 2. How do I grab the value being created within my void JoystickMethod(InputAction.CallbackContext obj)???
@JustinPBarnett2 жыл бұрын
try obj.action.ReadValue()
@JonTopping2 жыл бұрын
@@JustinPBarnett amazing! That's exactly what I needed thanks! Loving your videos
@jimmychen01233 жыл бұрын
Hello, first of all, this channel is great and helped a lot with my VR development. I have a question related to Unity action-based input with XR development. How to differentiate actions for a particular input? for example, the joystick from the Oculus Quest 2 can be used for scrolling in the menubar but also for rotating direction when teleporting. how should it be implemented? Thanks for reading this comment :)
@JustinPBarnett3 жыл бұрын
You'll just need to set up a new action map for whatever actions you want. So for example and action map for when you're holding a gun where the buttons will operate the gun's slide and magazine, but then swap it over to another action map for holding a steering wheel of a car
@ItsIsaacIO3 жыл бұрын
Right Now, Joystick For Default Movement Isnt Available. Its Just Joystick Up, Joystick Down, You Get It. How Would I Do This Now?
@JustinPBarnett3 жыл бұрын
Try changing the value you're getting. You may be on "axis" instead of "vector 2"
@stuartrichards543 жыл бұрын
Great stuff Justin. I'm trying to figure out how to map an action to bring up a menu (currently targeting Quest 2 build). From a UX perspective, I would assume that we would map the Menu button (the one with 3 lines), but I'm having a little trouble finding how to do that. Is it unmappable, and should I focus on another alternative button for the menu?
@JustinPBarnett3 жыл бұрын
It's built into the XR Interaction Toolkit! You'd do "ActionBasedController controller.uiPressAction += " in the code set the event or you can add to the event from inspector as well!
@stuartrichards543 жыл бұрын
@@JustinPBarnett Awesome. Will give it a shot tonight! Thanks so much.
@dracheneintopf36543 жыл бұрын
Hi, i try to follow your Tutorial, but it dosen't work. I don't know why, the console shows no Fails and the Cube youst drop down to the Ground and notheing happens. It didnt work with the PlayerInput Manageer and also not with your Advanced script. Did something changed in Unity since this time? I dont get ist :(
@JustinPBarnett3 жыл бұрын
Join the discord and we can help you troubleshoot!
@StoriesWithPrentice2 жыл бұрын
Wondering if someone can help, onmovementchanged isn't showing among the functions drop down for me?
@aaronsimon90412 жыл бұрын
be sure to make it public
@JasonSmith-pn6ch3 жыл бұрын
Thank You!
@JustinPBarnett3 жыл бұрын
You're welcome!
@nerliYaleks Жыл бұрын
i've been trying this but it's not working u__u i did a simple script with some debugs and actions assigned to the trigger and primary button to see if it was reading the imput and it's not showing...
@Nickk888SA3 жыл бұрын
Hey Justing, thanks for this Tutorial! But, what how to check which controller the user is using, for example, how to check if the Player presser the primaryButton on the controller on which the player holds the weapon? Like, pressing a button to release the ammo from a gun, but only the gun which is holding currently.
@JustinPBarnett3 жыл бұрын
I'd say use a bool variable on the hand. An "IsGrabbing" variable or something, then you can check for that to get the correct controller. Also the actions can be set to be left or right hand based on what map they're in
@Nickk888SA3 жыл бұрын
@@JustinPBarnett sure, but what about the other buttons on the controller? How to detect them?
@JustinPBarnett3 жыл бұрын
@@Nickk888SA oh simple! Just set up a new input action for it!
@PiNPOiNT2K2 жыл бұрын
does this work with your VR template?
@iansloman14343 жыл бұрын
I have enjoyed this video and found it very useful. Do you have the code for jumping, as I am having a problem trying to implement it?
@JustinPBarnett3 жыл бұрын
I don't have a video up about jumping yet, but I do know that Brackeys has a good FPS jumping tutorial that would work for this! Check out his channel.
@iansloman14343 жыл бұрын
@@JustinPBarnett Thanks for your quick reply. By viewing other videos, it looks like I might not need to jump, if I'm just going up and down stairs. While playing with this, I found that my XR Rig goes right through walls. What do I have to add to the XR Rig to prevent it from going through walls?
@JustinPBarnett3 жыл бұрын
@@iansloman1434 The going through walls issue I solved in my VR Movement video!
@iansloman14343 жыл бұрын
@@JustinPBarnett Thanks, I look at it tomorrow.
@tiham8945 Жыл бұрын
Hey, I'm building my project in 2021.3 does this tutorial still work?
@JustinPBarnett Жыл бұрын
Yes
@SanderBos_art2 жыл бұрын
Hey Justin thanks for this great tutorial. I'm trying to trigger a different event when the player releases the button and I assume that happens with the movement.canceled command right? but when I attach that to another function both functions just fire at the same time when the button is pressed. any tips?
@JustinPBarnett2 жыл бұрын
If you're still having issues join the Discord and we can help you troubleshoot in #dev-help!
@EGLOVEzicgo3 жыл бұрын
Instead of flexing my fingers using the buttons on the vive controller, I want to flex my fingers with some keycode (ex:a,w,s,d) on the keyboard. I want to know how.
@JustinPBarnett3 жыл бұрын
Join the discord and we can help you figure it out!
@JustinPBarnett3 жыл бұрын
Download the Project (for FREE): www.vrcreators.io/codedownloads
@brendansullivan48722 жыл бұрын
Your a god thanks mate
@JustinPBarnett2 жыл бұрын
No problem 👍
@hansshadow3603 жыл бұрын
Ypu use SteamVR??????
@JustinPBarnett3 жыл бұрын
yup!
@kederop70123 жыл бұрын
Webcam is relly laggy
@JustinPBarnett3 жыл бұрын
Fixed hopefully!
@rickybobbyracing91063 жыл бұрын
@@JustinPBarnett Yeah, i think all your newer videos seem fine now. Also, your voice is perfect for this, easy to understand, clear.