This actually helped me understand what was wrong with my mouse interactions, as opposed to the dozens of articles and videos that just tell me "it's so simple! Here's a snippet of isolated code and 5 seconds explaining half of what's happening"
@AetherXIV2 жыл бұрын
new input system tuts are so rare. thank you for going deep on this for us
@8bbp2 жыл бұрын
Your video literally saved me hours of painful trial & error tests. Thank you very much!
@xanarihstudios29973 жыл бұрын
Your the only person consistently putting out new input tutorials so thank you so much! Do you think by any chance we will get a collision tutorial using the new 3rd person starter asset? Like damage detection or prompt player when they can perform certain actions by standing close enough to the target object.
@samyam3 жыл бұрын
Thanks! I hadn’t planned it but it’s a good idea. Maybe in the future! But for the latter you can use a collider with IsTrigger checked and implement the OnTriggerEnter function docs.unity3d.com/ScriptReference/Collider.OnTriggerEnter.html
@krissloo1433 жыл бұрын
Another great video Thank you documenting the new input system better than Unity itself did
@samyam3 жыл бұрын
Thank you :)!
@Shotgunfoot2 жыл бұрын
Cannot express my gratitude enough in helping me understand how to handle multiple interactions on a button. If I could like twice.
@samyam2 жыл бұрын
Your comment is very much appreciated! :)
@schmuck9242 жыл бұрын
Simple. Clear. Pertinent. Best in class, Samyam. Thank you so much for these!
@samyam2 жыл бұрын
Thank you! 😄
@Tarodev2 жыл бұрын
Super thorough, thank you!
@AlarmedPizza3 жыл бұрын
Thank you for the concise instructional video! Probably saved hours in implementing input controllers after learning this.
@samyam3 жыл бұрын
Awesome! Thanks :)
@JakubMachowski2 жыл бұрын
Thanks for that. You did what unity should do with their manual. Thanks a lot for that especially things since 6:30 :)
@vishalgupta52883 жыл бұрын
As always... you literally are the best and go-to for the new Input System modules... Thanks for making it so clear... :) Keep it up...
@samyam3 жыл бұрын
Thank you :)!
@snek53852 жыл бұрын
Thanks for sharing! Now I will definitely try to apply input interactions in my current project.
@radinapetrova83073 жыл бұрын
You are amazing ! I kind of never have seen videos which explain things in details , as you do ! If there was a scoring system in KZbin , your score would be 20 ot of 10 :) .
@samyam3 жыл бұрын
That's so nice!! Thank you so much :)
@Dailyfiver3 жыл бұрын
This Video seriously saved my bacon. I have been struggling with understanding this for almost a month! I appreciate you being so thorough. Just subscribed, keep up the great work!
@samyam3 жыл бұрын
Glad it helped!!
@celloj3703 Жыл бұрын
This is exactly what I need! Thank you!
@TechHamlin6 ай бұрын
This is so good content. Thanks for the great work! Helping me out a lot in my project! :-)
@lakminiliyanage62733 жыл бұрын
So I'm watching now this was premier in night
@dallinchristensen7460 Жыл бұрын
Thanks for the explanation. Helped me out a lot. Cheers!
@ayzermiomuniverse8729 Жыл бұрын
Thank you for this video, great explanation, saved me a lot of time
@willlacey7621 Жыл бұрын
Great video! Thanks!
@castlecodersltd Жыл бұрын
This was brilliant, thank you for sharing
@whiskers15603 жыл бұрын
Thank you so goddamn much. I hope you keep this up.
@QHuy113 жыл бұрын
Thanks, this is exactly what I was looking for
@abdulkadirdursun60723 жыл бұрын
Thanks a lot for this video. I look at the documentation but there are still too many thing i dont understand. This video helped me understand some of them clearly.
@samyam3 жыл бұрын
Awesome!
@clavesi3 жыл бұрын
Just what I was needing!
@user-em9su3dd9y2 жыл бұрын
Really well presented thanks!
@TwinGhosts3 жыл бұрын
Very nice video, thank you! Great voice for a tutorial, and I loved the editing too.
@samyam3 жыл бұрын
Thank you!!
@stefanovecchio61343 жыл бұрын
Great video, it's exactly what I needed! :D
@samyam3 жыл бұрын
Thanks!
@amirmehmood28782 жыл бұрын
Samyam great tutorial thanks alot. again great job.
@samyam2 жыл бұрын
Thank you!!
@LexGear2 жыл бұрын
Bravo. Good video.
@samyam2 жыл бұрын
Thank you!
@alfredoeleazarorozcoquesad29882 жыл бұрын
You da best!!!!
@-_IT_-3 жыл бұрын
You explain very well and you touch on things I have not yet heard from other videos on unity. I first heard about the new input system from you. Now I have to learn about that, so I will be sticking around, so thank you!
@samyam3 жыл бұрын
Thank you 😄
@Foxtrop132 жыл бұрын
so, it is a nightmare, long live the old input system, good work on the tutorial anyways
@samyam2 жыл бұрын
It is quite confusing at times not going to lie. Once you get used to it it gets better
@Dailyfiver3 жыл бұрын
Thanks!
@SquidKid09 Жыл бұрын
Amazing tutorial! I was just wondering why I keep getting errors like "The type or namespace name 'HoldInteraction' could not be found" Is it some sort of call at the beginning of the script? I'm probably just missing something really stupid though... lol
@LukeHwarang3 жыл бұрын
Thank you! =)
@kilosayaw Жыл бұрын
This was very clear to follow thank you! Do you know if the unity input system allows for action maps with simultaneous actions? Like 3 fingers tapping at the same time to perform a certain action? If so is that covered anywhere? Thanks!
@munchymcmouthington2982 жыл бұрын
Thank you for your tutorials, they're very clear. I understand what the new system is trying to solve but I'm absolutely mystified as to why they made it so opaque and complex in the process. I'm in industry (albeit, different toolchains day to day) and have coded for over 10 years in multiple frameworks/languages/etc. Heck, I've written in assembly... So If I'm struggling with it, what chance do newbies have?!
@samyam2 жыл бұрын
I agree it is pretty complicated to start, and the documentation doesn’t really help matters. I think they should spend more time on the docs at least, or perhaps make it less verbose.
@munchymcmouthington2982 жыл бұрын
It kind of takes me back to old DotNet documentation quite honestly; I've reported several pages because examples are either limited (for example, missing imports or context or missing demonstrations of where you might actually embed a specific stub) or altogether absent. I think they assume too liberally that their audience will have a good grasp of how to do things like find and import the correct dependencies for a specific class (e.g. the Interactions package)... Stuff like that can easily confuse/overwhelm novices. Oh well :/ hopefully this will all get smoothed out over time...
@JackyTran3 жыл бұрын
Once agin, great tutorial
@samyam3 жыл бұрын
Thank you!
@ElNerdgasmo3 жыл бұрын
Thanks
@nanyubusnis939710 ай бұрын
6:23 "Because you don't want the time between each of the taps to be too long because then it won't really register as a multi-tap." This is incorrect. What she meant to say was either: "You don't want the time to be too long, or it *will* register as a multi-tap." Like when you accidently press the button again within that time." Or "You don't want it too *short* or else people might not be fast enough because it *won't* register as a multi-tap." (Or she wanted to make an opinion and meant to say: "You don't want it to be too long, or it's not really a multi-tap." Like we all understand 'double-click' means you have to press the mouse button twice rapidly, or else you're just selecting the same thing twice. Which in turn, things like windows might interpret to mean you want to change the name, rather than merely select, or open a certain document. But I mean this is just opinion. A multi-tap is a multi-tap as long as the second tap falls within an arbitrarily defined time.)
@luciorojas42782 жыл бұрын
I love the way it is explained and how detailed this is but I have a genuine question to all amateur users like me or unity users in general. isn't this new input system way more tedious or complex to use to achieve basic actions than the previous input system?
@samyam2 жыл бұрын
It does require more upfront management and complexity, but the nature of it is to simplify cross platform input so in the long run it simplifies your life a lot rather than using the old one. I also really like using events for input. There is a learning curve but at least I think it’s worth it :) Thanks!
@luciorojas42782 жыл бұрын
@@samyam thank you for taking the time to reply and for your amazing tutorials!, I'll follow your advice and keep learning it until I figure it out :D
@risingforce9648 Жыл бұрын
hey there I need to create a "hold" button... I think it works in some manner, but how can I check the stats of time of how long I am pressing the holded button? for example I need to hold a button for hide my characters in the shadow... when I releaste the button I need to procedd to use other animations such as the idle state... but when I hit "w" in my keyboard I need to Hold amount of time the "w" key to switch from Idle or walking to the "hided" state... thx.
@SquidKid09 Жыл бұрын
I am having the same problem
@Chris-yq1fw Жыл бұрын
Hi, at 6:41, Why the "Press" is not performed ? As "Press" is not affected by the time but rather by Press point, in this case, you use keyboard then shouldn't it be triggered also ?
@MikeKing71010 ай бұрын
How can I make this input interact like I press the button once, not holding and the gameobject continues move forward?
Жыл бұрын
How can i jump in the next intercation? Example: I have interaction hold and tap on mouse press button, if i dont have the mouse on a gameobject in the game i instantly want to skip the hold interaction and check if taped. So i want to cancel the hold interaction. How can i do that? Sry for bad english
@rdothl5 Жыл бұрын
Isnt the whole point of new input system not to set explicitly strings in code for actions but to catch events using predefined callbacks?
@gonchi2610 Жыл бұрын
great video!! any ideas on how could I use this for a double W running system like in most fps games?
@HugoCortell2 жыл бұрын
Is it possible to use modifiers to disable/enable joystick 2D vectors? It seems like it only works for individual bindings rather than entire groups.
@wastelandsteampunk3391 Жыл бұрын
what if I'm using First Person with camera follows, does the camera needs raycast ?
@battlelab55232 жыл бұрын
Is it possible to change / override the interaction of actions at runtime? I need to add or remove interaction at runtime, I also hope it is possible to store the overridden interaction in json so that it can be loaded the next time the game is started. Is there a way to do this? I could not find any information about this Im using generated C# class
@inksword60294 ай бұрын
how can i make multi tap and hold?
@KillerGameDev3 жыл бұрын
Id LOOOOOVE to see this with something like photon or mirror involved(anything networked). Ive seen a few confusing things where controls for one computer are affecting a computer over the network making things like player movement impossible.
@samyam3 жыл бұрын
Maybe one day! 🙂
@mademade59393 жыл бұрын
Oh no, i dont know you live...love your video...anyway have you create a tutorial new input system for crosplatform pc and mobile?
@samyam3 жыл бұрын
I've done several tutorials on Touch controls, and most actions you can test on the computer (actions that require one finger) kzbin.info/www/bejne/e4Okf2iBd95lfdU You can add several bindings under an action, one for mobile and pc. However it might be tricky for emulating pinch where you need 2 fingers, you should differentiate what platform you are on and adjust it accordingly. Or you can possibly make a custom binding and interaction to support seamlessly switching between them!
@davidbarnaba7229 Жыл бұрын
I've got a question. I encountered an issue with this new system. Basically I want a bool to become true the moment you press the button, then change to false after, let's say, 0.5 sec, even if you hold down the button. Tried different combinations of interactions (press, tap, etc) and callback (started, performed, canceled) but nothing seems to work. If I hold down the button the bool remains true. Any suggestion? Thank you very much
@samyam Жыл бұрын
How are you setting this boolean? Maybe you are setting it once it is true, but not setting it to false in the canceled callback. I believe tap would be the best interaction for this
@iR3dy3 жыл бұрын
What would be the best input action and interaction to use for say, if you grab something you have through it? Would I set up 2 different inputs for this so say I press E to interact which will pick up the grab the box and I have to hold shift to aim and press E to throw again? Or maybe Just press E again to drop the item. Would a custom one be the best option?
@samyam3 жыл бұрын
A custom one would be useful if these actions had to be performed in a certain way or pattern, however if the player is just picking it up and can throw it whenever they'd like, I'd make it two different events or actions, depending on the behaviour you want. If you'd like it to be the same button you can differentiate in the callback if (context is SlowTap) This will be performed once the use has held it and let go, then you can throw it. Hope that helps!
@YeahThatGuy73 жыл бұрын
Hey, I was hoping you could clear something up for me. How should I make it so a button needs to be NOT pressed for an action to work. Example: Jump is A on a controller but not when RT is being pressed/held (the reason for this is I want RT+A to be a different action).
@samyam3 жыл бұрын
You can either do a manual check in your code jump.performed => { if pressing RT, don't jump } Or you can possibly make a custom modifier which I explain here, where you can take in the jump and RT, and only perform the Jump when the RT isn't pressed. kzbin.info/www/bejne/gYmpZIKIbJ2cjLs
@YeahThatGuy73 жыл бұрын
@@samyam Earlier I followed one of your other videos and made a processor that makes 0 into 1 and 1 into 0 (in order to detect if RT wasn't being pressed). That didn't seem to work, am I misunderstanding processors? I basically need the modifiers to fire when they are NOT pressed. So A is the button and RT is the modifier and as long as RT is not being pressed it listens for A
@samyam3 жыл бұрын
@@YeahThatGuy7 Processors are executed at the end, they change the output once it's been processed, so the modifier won't know about the processor's changes. You need to do that check in your modifier instead.
@maxncjhbvjbjhbfdjh2 жыл бұрын
Hope you can help me, but how can I make so when two buttons are pressed it will execute a new action instead of the ones those buttons are “binded” to? Thanks for the tutorial btw
@samyam2 жыл бұрын
You can create a new modifier action with those two buttons, but if you use those same bindings set for a different action it will still execute, which is a unfortunate you’ll need to manually check in your code that your not executing the code for the individual buttons if both are pressed.
@maxncjhbvjbjhbfdjh2 жыл бұрын
@@samyam manage to figure it out. Thank you so much anyways. Love your videos. They have helped me a lot.
@samyam2 жыл бұрын
Glad to help!
@quentinhonore38392 жыл бұрын
Do you know how I can change the "HoldTime" of the hold interaction at runtime? It's because i created a "Hold spacebar to jump higher" mechanic in my game with the help of hold interaction. I want to modify the HoldTime in-game when I get a bonus but the interactions are read-only when I look at it in my code. I tried to create a custom interaction with a function to set the duration value but failed...
@joshuabidwell26142 жыл бұрын
If you want to do a Mario jump, do your normal velocity change/force application on button action start/performed whatever but then check if it's held each update with another bool like jumpHeld = jumpAction.IsPressed();
@AlexJrDev2 жыл бұрын
Would this input system still be useful in late 2021 / 2022? Since I Believe unity made some updates to their input system so just wondering.
@samyam2 жыл бұрын
Yes!
@jroc67453 жыл бұрын
I've been looking for this. Thanks a lot. I have a question tho... I want a sprint thats performed via button mashing. Which tap (1 tap or multi-tap) would be better for this and how do I code it? Multi-tap sounds like my player wont run unless multiple taps are performed first. I need him to run on the first tap but I also want the player to continue tapping in order to continue running.
@samyam3 жыл бұрын
I’d use multi tap, and have the player start running when the .started callback is called, and then stop running when the multitask comes callback is .performed or .cancelled
@jroc67453 жыл бұрын
@@samyam Thank you but I didnt quite understand that. I apologize I'm a beginner.
@samyam3 жыл бұрын
Sorry some of the words were autocorrected so it’s harder to understand. Basically subscribe to the started callback, when the multi tap has started, and have the player start running there (maybe set a boolean or start a coroutine), then also subscribe to the performed or cancelled callback and have the player either perform/complete their running action once it has been .performed, or stop the running once the action has been .cancelled. Does that make sense?
@jroc67453 жыл бұрын
@@samyam No lol I think need to see this done in action. Thank you for trying to help me tho.
@unityshorts55433 жыл бұрын
at 7:25 while doing multi tap the code is also registering single tap event how to avoid that i want a function to run on single tap and a different function to run on multi tap and when multi tap function is executed single tap function should not run
@samyam3 жыл бұрын
Hm you can try adding both a multi tap and tap event to the same action or binding, but have the multi tap at the top of the list, so that if that event is canceled for some reason (aka, the user doesn’t do the multi tap) then it transfers over to the tap processor and executes it forum.unity.com/threads/having-multitap-interaction-issues.859300/
@unityshorts55433 жыл бұрын
@@samyam thanks a lot :)
@unityshorts55433 жыл бұрын
@@samyam i felt like it worked initially but i noticed that the response is a little slow like when it registers the cancelled event for multi click after that the function for click is executed this behavior does not work for my case i need the reaction to be immediate Current code :- private void Awake() { mainCamera = Camera.main; input = new InputMaster(); input.Actions.Click.canceled += ctx => shoot(); input.Actions.Click.performed += ctx1 => rotate(); } void shoot() { DetectObject(); Debug.Log("started"); } void rotate() { RotateObjects(); Debug.Log("performed"); }
@samyam3 жыл бұрын
There’s no way for the tap not to be performed once the multi tap starts since you are tapping, so you’d need to check manually depending on what you are tapping on I have a video here if you want to get the object under the mouse click (or finger touch in this case) kzbin.info/www/bejne/gHqnaIyXfaangaM
@CoreGames20002 жыл бұрын
but release trigger is not working correctly : (
@Betruet2 жыл бұрын
I'm just finding this out and its killing me :/
@vick35542 жыл бұрын
Hii.. Please how can I increase the perform phase for a 3rd person shooter I made. I want to click, then watch the player shoot animation play and then back to idle state.
@samyam2 жыл бұрын
You can’t increase the perform phase, it’ll be called once an action is performed or not. You’ll have to manage that through your code directly. For example in your function that is called when .perform is executed, you can play the shooting animation, and in the animation graph set the transition from shooting to idle, and check Exit Time checkbox, so that the idle will automatically start playing when the firing animation finishes.
@vick35542 жыл бұрын
@@samyam so I make a parameter between them in the animator... But honestly the input system is too hard
@vick35542 жыл бұрын
@@samyam ..Ok.. so I use parameters in the animator and then untick exit time and loop time...
@samyam2 жыл бұрын
It has a learning curve but once you learn it it makes life simpler! :)
@vick35542 жыл бұрын
@@samyam But how long has it taken you
@tmate88-j8y Жыл бұрын
The cube visual was super helpful! Thank you so much for this video. Unity docs are awful.
@User334233 жыл бұрын
coud you make a tutorial on how to make a mobile swipe fps cam in new input system, like in most mobile fps shooters i am realy lost and have no clues what to do, google didnt help either.
@samyam3 жыл бұрын
I have a first person video here kzbin.info/www/bejne/a5_CmaCnfcmcoK8 And then a video on third person joystick to look around kzbin.info/www/bejne/j4eYfIKQfdh8sJY So instead of using the third person camera, you can use the first person camera, and the rest is almost the same. In the joystick video I use a “hack” to move the screen by placing an invisible joystick in the camera area to move the camera (on screen joystick) however I have a video on swiping if you don’t want to use that hack kzbin.info/www/bejne/jobbkISif9WXZq8
@User334233 жыл бұрын
@@samyam tnx i did it using touchscreen delta
@erosjagatpulagana64033 жыл бұрын
Am I too soon? I'M TOO SOON
@samyam3 жыл бұрын
Only ~30 minutes left!
@pixelman4573 жыл бұрын
hi i’m having issues joining your discord server . it keeps saying server requirements have changed
@samyam3 жыл бұрын
Hm try this link, and make sure your email is verified with Discord discord.gg/mj3dSnmaZc
@pixelman4573 жыл бұрын
@@samyam same issue. and my email is verified
@samyam3 жыл бұрын
Seems people online say to either update the app, or try it on web
@pixelman4573 жыл бұрын
@@samyam oh thanks it works now
@melihcanozdemir73093 жыл бұрын
Can you do a dialogue system in 2D and 3D
@samyam3 жыл бұрын
So like Mass Effect where you can choose different options, or just simple npc dialogue?
@melihcanozdemir73093 жыл бұрын
@@samyam Yes, like Mass Effect. Also you are so concerned with your subs. Thanks for everything
@samyam3 жыл бұрын
Something like that is on my list, got a lot of stuff I want to cover though, let’s see! And thank you :)
@greenTech883 жыл бұрын
Android button customise tutorial call of duty mobile
@samyam3 жыл бұрын
Not currently in my near planned videos sorry!
@ShatabdaRoy1153 жыл бұрын
Android?
@samyam3 жыл бұрын
Interactions should also work on Android, that's what is great about the input system!
@VolkGam2 жыл бұрын
Hello! Multi Tap does not work. Works only .started, .canceled. This does not work: _controlls.Enter.MultiTouch.performed += _ => Peformed(); I'm doing everything right. I need a double click on the screen. On a tablet, double-click works in other applications. Why do you think I can't get the performed event when I double-click with my finger on the screen? It just doesn't work. I tried changing the Button to Pass Through + Button, Touch, Double - the same thing... There is a discussion of this problem on the Unity Forum - MultiTap not working with Keyboard/Mouse + Gamepad active simultaneously. Help people if you know how to solve this problem. Thanks!